diff options
-rw-r--r-- | chapter6/backup.sh | 6 | ||||
-rw-r--r-- | chapter6/cleanup.sh | 2 | ||||
-rw-r--r-- | download.sh | 7 | ||||
-rwxr-xr-x | lfs.sh | 2 | ||||
-rw-r--r-- | packageinstall.sh | 10 |
5 files changed, 12 insertions, 15 deletions
diff --git a/chapter6/backup.sh b/chapter6/backup.sh index 5d5030a..615aaf7 100644 --- a/chapter6/backup.sh +++ b/chapter6/backup.sh @@ -4,7 +4,7 @@ file="${LFS_VER}-ch6-backup.tar.xz" directories=(bin etc lib lib64 sbin tools usr var) if [ -f "${LFS}/sources/chapter6/backup" ]; then - printf "%b" " ${IGRN}Backup found. Remove manually to backup again.\n${RST}" + printf "%b" " ${IGRN}Backup found. Remove manually to backup again.${RST}\n" else echo -ne "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... " @@ -13,11 +13,11 @@ else spinner "$pid" "${SPINNER}" retval=$? if [ "$retval" -ne 0 ]; then - printf "%b" "${RED}FAILED!${RST}\n" + printf "%b" "${IRED}FAILED!${RST}\n" exit "${retval}" else sudo chown "${USER}" "${HOME}"/"${file}" - printf "%b" "${GRN}OK${RST}\n" + printf "%b" "${IGRN}OK${RST}\n" fi popd > /dev/null || exit 1 diff --git a/chapter6/cleanup.sh b/chapter6/cleanup.sh index dc8a75a..9bd8fee 100644 --- a/chapter6/cleanup.sh +++ b/chapter6/cleanup.sh @@ -18,6 +18,6 @@ else strip --strip-unneeded "${LFS}"/usr/sbin/* >/dev/null 2>&1 strip --strip-unneeded "${LFS}"/tools/bin/* >/dev/null 2>&1 - echo -e "${GRN}OK${RST}" + echo -e "${IGRN}OK${RST}\n" touch "${LFS}"/sources/chapter6/cleanup >/dev/null 2>&1 fi diff --git a/download.sh b/download.sh index af1dd08..72c250b 100644 --- a/download.sh +++ b/download.sh @@ -10,8 +10,6 @@ cat packages.csv patches.csv | while read -r line; do CACHEFILE="$(basename "${URL}")" if [[ ! -f "${CACHEFILE}" ]]; then - - printf "%b" "${PRP}Downloading ${YLW}${CACHEFILE}${RST}... " download "${URL}" else @@ -20,10 +18,9 @@ cat packages.csv patches.csv | while read -r line; do if ! echo "${MD5SUM} ${LFS}/sources/${CACHEFILE}" | md5sum -c > /dev/null 2>&1; then rm -f "${LFS}/sources/${CACHEFILE}" - printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM} ${RED}FAILED! MD5 MISMATCH!${RST}\n" + printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM}${IRED} FAILED! MD5 MISMATCH!${RST}\n" exit 1 fi - - printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM}${GRN} OK\n${RST}" + printf "%b" "\n${IPRP} MD5SUM ${YLW}${MD5SUM}${IGRN} OK${RST}\n" done @@ -96,7 +96,7 @@ ${GRN}target directory... ${RST}" if ! cp -rf ./*.sh chapter* ./*.csv "${LFS}/sources"; then printf "%b" "${IRED}FAILED!${RST}\n" else - printf "%b" "${GRN}OK${RST}\n" + printf "%b" "${IGRN}OK${RST}\n" fi cd "${LFS}/sources" || exit 1 diff --git a/packageinstall.sh b/packageinstall.sh index 43fd4eb..1374b21 100644 --- a/packageinstall.sh +++ b/packageinstall.sh @@ -21,26 +21,26 @@ else spinner "$pid" "${SPINNER}" retval=$? if [[ "$retval" -ne 0 ]]; then - printf "%b" "${GRN}Extraction ${RED}FAILED!${RST}\n" + printf "%b" "${GRN}Extraction ${IRED}FAILED!${RST}\n" return $retval else - printf "%b" "${GRN}OK${RST}\n" + printf "%b" "${IGRN}OK${RST}\n" fi pushd "${DIRNAME}" > /dev/null || return 1 - printf "%b" "${CYN}Compiling ${YLW}${PACKAGE}${RST}... " + printf "%b" " ${CYN}Compiling ${YLW}${PACKAGE}${RST}... " mkdir -p "${LFS}/sources/log/chapter${CHAPTER}/" source "${LFS}/sources/chapter${CHAPTER}/${PACKAGE}.sh" 2>&1 > "${LFS}/sources/log/chapter${CHAPTER}/${PACKAGE}.log" 2>&1 & pid=$! spinner "$pid" "${SPINNER}" retval=$? if [[ "$retval" -ne 0 ]]; then - printf "%b" "${RED}FAILED!${RST}\n" + printf "%b" "${IRED}FAILED!${RST}\n" popd > /dev/null || return 1 return $retval else - printf "%b" "${GRN}OK${RST}\n" + printf "%b" "${IGRN}OK${RST}\n" touch "${LFS}"/sources/chapter"${CHAPTER}"/"${PACKAGE}" rm -rf "${LFS}"/sources/"${DIRNAME}" fi |