diff options
Diffstat (limited to 'lfs.sh')
-rwxr-xr-x | lfs.sh | 21 |
1 files changed, 12 insertions, 9 deletions
@@ -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 |