Added missing quotes to fix unary operator expected warning in rare occasions (inspired from [MafiaInc])
This commit is contained in:
parent
f7bbf4ad70
commit
f2f2a49a56
1 changed files with 3 additions and 3 deletions
|
|
@ -56,13 +56,13 @@ S3CMD="$(which s3cmd)"
|
|||
# the script is running at a time.
|
||||
LOCKFILE=${LOGDIR}backup.lock
|
||||
|
||||
if [ $ENCRYPTION = "yes" ]; then
|
||||
if [ "$ENCRYPTION" = "yes" ]; then
|
||||
if [ ! -z "$GPG_KEY" ]; then
|
||||
ENCRYPT="--encrypt-key=${GPG_KEY} --sign-key=${GPG_KEY}"
|
||||
elif [ ! -z "$PASSPHRASE" ]; then
|
||||
ENCRYPT=""
|
||||
fi
|
||||
elif [ $ENCRYPTION = "no" ]; then
|
||||
elif [ "$ENCRYPTION" = "no" ]; then
|
||||
ENCRYPT="--no-encryption"
|
||||
fi
|
||||
|
||||
|
|
@ -79,7 +79,7 @@ if [ ! -x "$DUPLICITY" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
if [ `echo ${DEST} | cut -c 1,2` = "s3" ]; then
|
||||
if [ "`echo ${DEST} | cut -c 1,2`" = "s3" ]; then
|
||||
DEST_IS_S3=true
|
||||
if [ ! -x "$S3CMD" ]; then
|
||||
echo $NO_S3CMD; S3CMD_AVAIL=false
|
||||
|
|
|
|||
Loading…
Reference in a new issue