Bug 37038: (QA follow-up) Replace \> by -gt

Note that -gt is the bash integer comparison and > is the
lexical one:
$ if [ '1' \> '09' ]; then echo true; fi
true
$ if [ '1' -gt '09' ]; then echo true; fi

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
[EDIT] Added the dev/null redirection to suppress warn in bin/sh.
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Marcel de Rooy 2024-06-28 06:29:50 +00:00 committed by Katrin Fischer
parent bc92152e2f
commit fd7130beca
No known key found for this signature in database
GPG Key ID: 0EF6E2C03357A834
1 changed files with 2 additions and 2 deletions

View File

@ -90,12 +90,12 @@ run_rebuild_elasticsearch()
KOHA_BINDIR=${KOHA_HOME}/misc
fi
if [ "${clo_commit_size}" \> 0 ]; then
if [ "${clo_commit_size}" -gt 0 ] 2>/dev/null; then
commit_size=${clo_commit_size}
fi
rebuild_opts="--commit ${commit_size}"
if [ "${clo_processes}" \> 0 ]; then
if [ "${clo_processes}" -gt 0 ] 2>/dev/null; then
processes=${clo_processes}
fi
rebuild_opts="${rebuild_opts} --processes ${processes}"