aboutsummaryrefslogtreecommitdiffstats
path: root/chapter7/backup.sh
diff options
context:
space:
mode:
authorWilliam Harrington <kb0iic@berzerkula.org>2021-04-15 08:32:23 -0500
committerWilliam Harrington <kb0iic@berzerkula.org>2021-04-15 08:32:23 -0500
commitc9cb04e59113a3afb1cc9fde17dc8bb27a0a315c (patch)
tree205f4d9047a96559c2ff4f79901c457432367d2e /chapter7/backup.sh
parent786adf80589621bedd25488f08ba4e1dc6831282 (diff)
Create fail and success functions and remove trailing white spaces at ends of lines.
Diffstat (limited to 'chapter7/backup.sh')
-rw-r--r--chapter7/backup.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/chapter7/backup.sh b/chapter7/backup.sh
index 9418775..b903897 100644
--- a/chapter7/backup.sh
+++ b/chapter7/backup.sh
@@ -15,12 +15,12 @@ else
spinner "$pid" "${SPINNER}"
retval=$?
if [ "${retval}" -ne 0 ]; then
- printf "%b" "${IRED}FAILED!${RST}\n"
+ fail "FAILED!"
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"
+ success "OK"
fi
popd > /dev/null || exit 1