#998769 apertium-eo-en: bashism in configure script

#998769#5
Date:
2021-11-07 19:27:42 UTC
From:
To:
Hi,

Your package uses configure script with bash features not present in
POSIX without explicitly declaring the need to bash shell; this
currently works as configure scripts select bash, but when dash enables
LINENO support, your configure script will start failing:

     /bin/sh: 1: [: unexpected operator
     apertium-preprocess-transfer-bytecode-j apertium-eo-en.eo-en.t1x eo-en.t1x.class
     make[2]: apertium-preprocess-transfer-bytecode-j: No such file or directory
     make[2]: [Makefile:804: eo-en.t1x.bin] Error 127 (ignored)
     apertium-validate-interchunk apertium-eo-en.eo-en.t2x
     apertium-preprocess-transfer apertium-eo-en.eo-en.t2x eo-en.t2x.bin
     apertium-validate-interchunk apertium-eo-en.eo-en.antaux_t2x
     apertium-preprocess-transfer apertium-eo-en.eo-en.antaux_t2x eo-en.antaux_t2x.bin
     apertium-validate-postchunk apertium-eo-en.eo-en.t3x
     apertium-preprocess-transfer apertium-eo-en.eo-en.t3x eo-en.t3x.bin
     apertium-validate-transfer apertium-eo-en.en-eo.t1x
     apertium-preprocess-transfer apertium-eo-en.en-eo.t1x en-eo.t1x.bin
     Warning (3360): Paths to rule 57 blocked by rule 55.
     Warning (4670): Paths to rule 82 blocked by rule 81.
     /usr/bin/which: this version of `which' is deprecated; use `command -v' in scripts instead.
     /bin/sh: 1: [: unexpected operator
     apertium-preprocess-transfer-bytecode-j apertium-eo-en.en-eo.t1x en-eo.t1x.class
     make[2]: apertium-preprocess-transfer-bytecode-j: No such file or directory
     make[2]: [Makefile:818: en-eo.t1x.bin] Error 127 (ignored)

To test this, you can install dash from experimental and re-run the
configure script.

Please replace non-POSIX features with their equivalents to make sure
the script runs with dash. Most common ones are usage of == instead of =
and for with arrays (not lists).