tdf#105204 fix shellcheck warning in setup_native/scripts/unpack_update.sh

Change-Id: Ic2a3b58dac3bc148cf9a2bd8237574d4851aabe6
SC2006: Use $(STATEMENT) instead of legacy `STATEMENT`
SC2035: Use ./*glob* or -- *glob* so names with dashes won't become options.
Reviewed-on: https://gerrit.libreoffice.org/37681
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
This commit is contained in:
Yeliz Taneroğlu 2017-05-16 15:11:06 +03:00 committed by Chris Sherlock
parent 027d661ef7
commit 46a30d5eb8

View file

@ -27,7 +27,7 @@ NUM=1
DESTPATH="$BASEDIR/$FOLDER"
while [ -d "$DESTPATH" ]; do
NUM=`expr $NUM + 1`
NUM=$(expr $NUM + 1)
DESTPATH="$BASEDIR/$FOLDER-$NUM"
done
@ -47,4 +47,4 @@ else
exit 2
fi
UPDATE=`eval ls */update` && SUBFOLDER=`dirname $UPDATE` && mv $SUBFOLDER/* . && rmdir $SUBFOLDER && echo "$DESTPATH/update"
UPDATE=$(eval ls ./*/update) && SUBFOLDER=$(dirname $UPDATE) && mv $SUBFOLDER/* . && rmdir $SUBFOLDER && echo "$DESTPATH/update"