From ab42e4c660a6f25bae5a5388bc140953a87a3248 Mon Sep 17 00:00:00 2001 From: William Harrington Date: Thu, 8 Apr 2021 18:50:46 -0500 Subject: Add shellcheck directives. --- chapter6/backup.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'chapter6') diff --git a/chapter6/backup.sh b/chapter6/backup.sh index a27440b..43e8b18 100644 --- a/chapter6/backup.sh +++ b/chapter6/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/chapter6/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/chapter6/backup.log printf "%b" "${IGRN}OK${RST}\n" fi -- cgit v1.2.3-54-g00ecf