aboutsummaryrefslogtreecommitdiffstats
path: root/lfs.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lfs.sh')
-rwxr-xr-xlfs.sh23
1 files changed, 13 insertions, 10 deletions
diff --git a/lfs.sh b/lfs.sh
index e5c6c60..8cd843a 100755
--- a/lfs.sh
+++ b/lfs.sh
@@ -33,23 +33,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
@@ -95,10 +98,10 @@ esac
printf "%b" "${GRN}Copying required files to ${YLW}${LFS}/sources \
${GRN}target directory${RST}... "
-if ! cp -rf ./*.sh chapter* ./*.csv kernelconfig "${LFS}/sources"; then
- printf "%b" "${IRED}FAILED!${RST}\n"
+if ! cp -rf ./*.sh chapter* ./*.csv "${LFS}/sources"; then
+ fail "FAILED!"
else
- printf "%b" "${IGRN}OK${RST}\n"
+ success "OK"
fi
cd "${LFS}/sources" || exit 1
@@ -144,7 +147,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