diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-03-23 14:10:54 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-03-23 14:10:54 -0500 |
commit | a637659b41e1930349b31ce152c1cfbb9a6b5333 (patch) | |
tree | 29980208a5c4f9c7ba9b9709e5863f5a1d7930ad /packageinstall.sh | |
parent | 66d4171655e0b93766c82f50ce06521f85b58222 (diff) | |
parent | a9998650875c122d505c3046b23dc5f8590857f7 (diff) |
Merge master to chapter7
Diffstat (limited to 'packageinstall.sh')
-rw-r--r-- | packageinstall.sh | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/packageinstall.sh b/packageinstall.sh index a890ded..c08710a 100644 --- a/packageinstall.sh +++ b/packageinstall.sh @@ -4,7 +4,7 @@ CHAPTER="$1" PACKAGE="$2" if [ -f "${LFS}/sources/chapter${CHAPTER}/${PACKAGE}" ]; then - echo -e "${GRN}Package ${YLW}${PACKAGE} ${GRN}already built and installed for ${YLW}Chapter ${CHAPTER}.${RST}" + printf "%b" "${GRN}Package ${YLW}${PACKAGE} ${GRN}already built and installed for ${YLW}Chapter ${CHAPTER}.${RST}\n" else grep -i "^${PACKAGE}" packages.csv | grep -i -v "\.patch;" | while read -r line; do @@ -17,18 +17,18 @@ else # Remove existing if exists rm -rf "${DIRNAME}" - echo -ne "${IBLU}Extracting ${YLW}${CACHEFILE}... " + printf "%b" "${IBLU}Extracting ${YLW}${CACHEFILE}... " tar xf "${CACHEFILE}" > /dev/null 2>&1 & pid=$! spinner "$pid" retval=$? if [ "$retval" -ne 0 ]; then - echo -e "${GRN}Extraction ${RED}FAILED!${RST}" + printf "%b" "${GRN}Extraction ${RED}FAILED!${RST}\n" return $retval fi pushd "${DIRNAME}" > /dev/null || return 1 - echo -ne "\n${CYN}Compiling ${YLW}${PACKAGE}${RST}... " + printf "%b" "\n${CYN}Compiling ${YLW}${PACKAGE}${RST}... " sleep 5 mkdir -p "${LFS}/sources/log/chapter${CHAPTER}/" @@ -36,11 +36,11 @@ else spinner "$pid" retval=$? if [ "$retval" -ne 0 ]; then - echo -e "\n${GRN}Compiling ${YLW}${PACKAGE} ${RED}FAILED!${RST}" + printf "%b" "${RED}FAILED!${RST}\n" popd > /dev/null || return 1 return $retval else - echo -e "\n${GRN}Done Compiling ${YLW}${PACKAGE}${RST}" + printf "%b" "${GRN}OK${RST}\n" touch "${LFS}"/sources/chapter"${CHAPTER}"/"${PACKAGE}" rm -rf "${LFS}"/sources/"${DIRNAME}" fi |