ae37de0e6559a37e4fd90ffbc3e9761961ac758f
- Author
- harrim4n <git@harrim4n.com>
- Committer
- harrim4n <git@harrim4n.com>
- Date
Message
fixed shellcheck errors
Diff
1diff --git a/duplicity-backup.sh b/duplicity-backup.sh
2index 0dcab0d2c2eefe396a2b4962907d2532e83a6137..beb44e1010e50b2365fd773b2704823103307a02 100755
3--- a/duplicity-backup.sh
4+++ b/duplicity-backup.sh
5@@ -720,12 +720,11 @@ get_remote_file_size()
6 SIZE="-b2 bucket wrong-"
7 return
8 fi
9- ${B2CMD} authorize-account ${ACC_ID} ${APP_KEY} 2>&1 >/dev/null
10- if [[ $? -ne 0 ]]; then
11+ if [[ $(${B2CMD} authorize-account "${ACC_ID}" "${APP_KEY}" >/dev/null 2>&1) -ne 0 ]]; then
12 SIZE="-b2 authentication wrong-"
13 return
14 fi
15- SIZE=$(${B2CMD} ls --long ${BUCKET} | awk '{ print $5 }' | paste -sd+ | bc | numfmt --to=iec)
16+ SIZE=$(${B2CMD} ls --long "${BUCKET}" | awk '{ print $5 }' | paste -sd+ | bc | numfmt --to=iec)
17 else
18 SIZE="-b2 not found in PATH-"
19 fi