fix: support for Bash version 3 in daily.sh (#4347)

This commit is contained in:
deutor
2016-09-06 18:31:16 +02:00
committed by Neil Lathwood
parent 948d4f67a1
commit 3691928455

View File

@@ -55,7 +55,12 @@ if [ -z "$arg" ]; then
fi
cnf=$(echo $(grep '\[.distributed_poller.\]' config.php | egrep -v -e '^//' -e '^#' | cut -d = -f 2 | sed 's/;//g'))
cnf=${cnf,,}
if ((${BASH_VERSINFO[0]} < 4)); then
cnf=`echo $cnf|tr [:upper:] [:lower:]`
else
cnf=${cnf,,}
fi
if [ -z "$cnf" ] || [ "$cnf" == "0" ] || [ "$cnf" == "false" ]; then
# Call ourself again in case above pull changed or added something to daily.sh
$0 post-pull