aboutsummaryrefslogtreecommitdiff
path: root/scripts/box
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-05 23:15:34 -0300
committerEuAndreh <eu@euandre.org>2019-06-05 23:15:34 -0300
commita780d7b1651e409e217d39c406f23ef2c1aa2edb (patch)
tree11af7f2d998195d4b0e6c7a914a402bafdd4dd8a /scripts/box
parentRestore backup in Ansible instead of Bash (diff)
downloadtoph-a780d7b1651e409e217d39c406f23ef2c1aa2edb.tar.gz
toph-a780d7b1651e409e217d39c406f23ef2c1aa2edb.tar.xz
Fix ShellCheck offenses
Diffstat (limited to 'scripts/box')
-rwxr-xr-xscripts/box/create-backup.env.sh2
-rwxr-xr-xscripts/box/restore-backup.env.sh4
2 files changed, 3 insertions, 3 deletions
diff --git a/scripts/box/create-backup.env.sh b/scripts/box/create-backup.env.sh
index c9b2d3d..b87df38 100755
--- a/scripts/box/create-backup.env.sh
+++ b/scripts/box/create-backup.env.sh
@@ -11,4 +11,4 @@ borg create \
--progress \
--compression lzma,6 \
"${BORG_REPO}::{hostname}-{now}-${VPS_COMMIT_SHA}" \
- ${VOLUME_HOME}/*
+ "${VOLUME_HOME}"/*
diff --git a/scripts/box/restore-backup.env.sh b/scripts/box/restore-backup.env.sh
index b12d4f0..14d462d 100755
--- a/scripts/box/restore-backup.env.sh
+++ b/scripts/box/restore-backup.env.sh
@@ -3,7 +3,7 @@
export BORG_REMOTE_PATH="${BORG_REMOTE_PATH}"
export BORG_PASSPHRASE="${BORG_PASSPHRASE}"
-pushd "$(mktemp -d)"
+pushd "$(mktemp -d)" || exit 1
ARCHIVE="$(borg list "${BORG_REPO}" --last 1 --short)"
echo "Extracting archive ${ARCHIVE}"
@@ -15,4 +15,4 @@ borg extract \
echo "Done."
mv home/vps/volumes/* /home/vps/volumes/
-popd
+popd || exit 1