aboutsummaryrefslogtreecommitdiffstats
path: root/packageinstall.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:39:39 -0500
commit8b5530be21a8e28e3e2c1b9917ca3645fbd13398 (patch)
tree8f8eee3c3e94dfdf60c025fd1fd2308738ef7341 /packageinstall.sh
parent801a63d7edbb098fdf4fa384366ba91e39845c07 (diff)
Create fail and success functions and remove trailing white spaces at ends of lines.
Diffstat (limited to 'packageinstall.sh')
-rw-r--r--packageinstall.sh9
1 files changed, 5 insertions, 4 deletions
diff --git a/packageinstall.sh b/packageinstall.sh
index 706880c..e0516db 100644
--- a/packageinstall.sh
+++ b/packageinstall.sh
@@ -26,10 +26,11 @@ else
spinner "$pid" "${SPINNER}"
retval=$?
if [[ "$retval" -ne 0 ]]; then
- printf "%b" "${GRN}Extraction ${IRED}FAILED!${RST}\n"
+ printf "%b" "${GRN}Extraction "
+ fail "FAILED!"
return $retval
else
- printf "%b" "${IGRN}OK${RST}\n"
+ success "OK"
fi
pushd "${DIRNAME}" > /dev/null || return 1
@@ -42,11 +43,11 @@ else
spinner "$pid" "${SPINNER}"
retval=$?
if [[ "$retval" -ne 0 ]]; then
- printf "%b" "${IRED}FAILED!${RST}\n"
+ fail "FAILED!"
popd > /dev/null || return 1
return $retval
else
- printf "%b" "${IGRN}OK${RST}\n"
+ success "OK"
touch "${LFS}"/sources/chapter"${CHAPTER}"/"${PACKAGE}"
rm -rf "${LFS}"/sources/"${DIRNAME}"
fi