diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-15 08:32:23 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-15 08:39:39 -0500 |
commit | 8b5530be21a8e28e3e2c1b9917ca3645fbd13398 (patch) | |
tree | 8f8eee3c3e94dfdf60c025fd1fd2308738ef7341 /chapter8 | |
parent | 801a63d7edbb098fdf4fa384366ba91e39845c07 (diff) |
Create fail and success functions and remove trailing white spaces at ends of lines.
Diffstat (limited to 'chapter8')
-rw-r--r-- | chapter8/backup.sh | 4 | ||||
-rw-r--r-- | chapter8/cleanup.sh | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/chapter8/backup.sh b/chapter8/backup.sh index d7a29ac..4df6f79 100644 --- a/chapter8/backup.sh +++ b/chapter8/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/chapter8/backup.log 2>&1 - printf "%b" "${IGRN}OK${RST}\n" + success "OK" fi popd > /dev/null || exit 1 diff --git a/chapter8/cleanup.sh b/chapter8/cleanup.sh index ec4084f..12bbae4 100644 --- a/chapter8/cleanup.sh +++ b/chapter8/cleanup.sh @@ -63,6 +63,6 @@ else } >"${LFS}"/sources/log/chapter8/cleanup.log 2>&1 - printf "%b" "${IGRN}OK${RST}\n" + success "OK" sudo touch "${LFS}"/sources/chapter8/cleanup >/dev/null 2>&1 fi |