diff options
Diffstat (limited to 'packageinstall.sh')
-rw-r--r-- | packageinstall.sh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/packageinstall.sh b/packageinstall.sh index afd11a0..43fd4eb 100644 --- a/packageinstall.sh +++ b/packageinstall.sh @@ -3,7 +3,7 @@ CHAPTER="$1" PACKAGE="$2" -if [ -f "${LFS}/sources/chapter${CHAPTER}/${PACKAGE}" ]; then +if [[ -f "${LFS}/sources/chapter${CHAPTER}/${PACKAGE}" ]]; then printf "%b" "${GRN}Package ${YLW}${PACKAGE} ${GRN}already built and installed for ${YLW}Chapter ${CHAPTER}.${RST}\n" else @@ -20,7 +20,7 @@ else tar xf "${CACHEFILE}" > /dev/null 2>&1 & pid=$! spinner "$pid" "${SPINNER}" retval=$? - if [ "$retval" -ne 0 ]; then + if [[ "$retval" -ne 0 ]]; then printf "%b" "${GRN}Extraction ${RED}FAILED!${RST}\n" return $retval else @@ -35,7 +35,7 @@ else 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 + if [[ "$retval" -ne 0 ]]; then printf "%b" "${RED}FAILED!${RST}\n" popd > /dev/null || return 1 return $retval |