aboutsummaryrefslogtreecommitdiffstats
path: root/chapter7/backup.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-08 18:50:46 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-08 18:53:44 -0500
commitab42e4c660a6f25bae5a5388bc140953a87a3248 (patch)
treec7b8f80f69bed1cd903236bc14bbdb4015ee35f4 /chapter7/backup.sh
parent58ed189f35f6c972aa30711d1889707a5808aa48 (diff)
Add shellcheck directives.
Diffstat (limited to 'chapter7/backup.sh')
-rw-r--r--chapter7/backup.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/chapter7/backup.sh b/chapter7/backup.sh
index 7cfb29f..38d626f 100644
--- a/chapter7/backup.sh
+++ b/chapter7/backup.sh
@@ -9,6 +9,7 @@ else
printf "%b" "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... "
pushd "${LFS}" > /dev/null || exit 1
+ # shellcheck disable=SC2024
sudo XZ_OPTS="-T${NUMPROCS} -e" tar cJvpf "${HOME}"/"${file}" "${directories[@]}" >"${LFS}"/sources/log/chapter7/backup.log 2>&1 & pid=$!
spinner "$pid" "${SPINNER}"
retval=$?
@@ -16,6 +17,7 @@ else
printf "%b" "${IRED}FAILED!${RST}\n"
exit "${retval}"
else
+ # shellcheck disable=SC2024
sudo chown -v "${USER}":"$(id -g)" "${HOME}"/"${file}" >"${LFS}"/sources/log/chapter7/backup.log 2>&1
printf "%b" "${IGRN}OK${RST}\n"
fi