aboutsummaryrefslogtreecommitdiffstats
path: root/packageinstall.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packageinstall.sh')
-rw-r--r--packageinstall.sh12
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