[PATCH 1/3] Add notmuch_database_close_compact

Kim Minh Kaplan kimminh.kaplan+nomuch at afnic.fr
Wed Aug 22 22:56:57 PDT 2012


Tomi Ollila :

> On Tue, Aug 21 2012, Ben Gamari wrote:
>
>> Eh? 1.2.6 is the first Xapian release to have Compactor exposed in the
>> public API.
>
> Presuming that those variables are always numeric the comparison could be:
>
> if [ ${xapian_major_version} -gt 1 ] || 
>    [ ${xapian_major_version} -eq 1 -a ${xapian_minor_version} -gt 2 ] || 
>    [ ${xapian_major_version} -eq 1 -a ${xapian_minor_version} -eq 2 -a \
>      ${xapian_subminor_version} -ge 6 ]; then
>
> (I could not figure out anything shorter and/or cleaner)

Try:

    case "${xapian_version}" in
         0.*|1.[01].*|1.2.[0-5]) ;;
         *) ... ;;
    esac

Kim Minh.


More information about the notmuch mailing list