aboutsummaryrefslogtreecommitdiffstats
path: root/lfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lfs.sh')
-rwxr-xr-xlfs.sh21
1 files changed, 12 insertions, 9 deletions
diff --git a/lfs.sh b/lfs.sh
index a6b2abc..1331c7a 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -34,23 +34,26 @@ before continuing.${RST}\n\n\n"
printf "%b" "${IGRN}CONTINUE ${IWHTB}(C)${RST} / ${IRED}ABORT ${IWHTB}(OTHER)${RST}\n"
if read -r -n 1 contabort; then
if [[ "$contabort" == "C" ]] || [[ "$contabort" == "c" ]]; then
- printf "%b" "\b${IWHT}Build is ${IGRN}CONTINUING${RST}\n\n"
- else
- printf "%b" "\b${IWHT}Build ${IRED}ABORTED!\n\n"
+ printf "%b" "\b${IWHT}Build is "
+ success "CONTINUING\n"
+ else
+ printf "%b" "\b${IWHT}Build "
+ fail "ABORTED!\n"
exit 0
fi
else
- printf "%b" "\b${IWHT}Selection ${IRED}FAILURE!${RST}\n\n"
+ printf "%b" "\b${IWHT}Selection "
+ fail "FAILURE!\n"
exit 1
fi
# Create LFS directory if it doesn't exist
printf "%b" "${GRN}Creating LFS directory at ${YLW}${LFS}${GRN}${RST}... "
if [[ -d "${LFS}" ]]; then
- printf "%b" "${IGRN}EXISTS${RST}\n"
+ success "EXISTS"
else
if ! mkdir "${LFS}" >/dev/null 2>&1; then
- printf "%b" "${IRED}FAILED!${RST}\n"
+ fail "FAILED!"
exit 1
fi
fi
@@ -97,9 +100,9 @@ printf "%b" "${GRN}Copying required files to ${YLW}${LFS}/sources \
${GRN}target directory${RST}... "
if ! cp -rf ./*.sh chapter* ./*.csv "${LFS}/sources"; then
- printf "%b" "${IRED}FAILED!${RST}\n"
+ fail "FAILED!"
else
- printf "%b" "${IGRN}OK${RST}\n"
+ success "OK"
fi
cd "${LFS}/sources" || exit 1
@@ -145,7 +148,7 @@ chmod ugo+x preparechroot.sh
chmod ugo+x insidechroot.sh
printf "%b" "\n${CYN}PREPARING ${RED}CHROOT${CYN} ENVIRONMENT${RST}...\n"
-source preparechroot.sh "${LFS}"
+source preparechroot.sh "${LFS}"
source createdirs.sh
source essential.sh