diff options
author | William Harrington <kb0iic@berzerkula.org> | 2021-04-02 11:08:30 -0500 |
---|---|---|
committer | William Harrington <kb0iic@berzerkula.org> | 2021-04-02 11:08:30 -0500 |
commit | 315ce2397efab99a8a15cd2bb73367b00f178418 (patch) | |
tree | d9798c354440ce542c2a9c5e1b93024ee56df99e /lfs.sh | |
parent | e8c0f5a1a0d7ccee510fa59e577cccd46d68e3f8 (diff) |
Use if [[ ... ]] instead of [ ... ] and change retval check in setupdisk when checking exit code when creating partition.
Diffstat (limited to 'lfs.sh')
-rwxr-xr-x | lfs.sh | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -33,7 +33,7 @@ before continuing.${RST}\n\n\n" # Continue or Abort 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 + 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" @@ -94,7 +94,7 @@ printf "%b" "\n${IWHT}============ ${IGRN}Downloading source files and patches \ ${IWHT}============${RST}\n" source download.sh retval=$? -if [ "$retval" -ne 0 ]; then +if [[ "$retval" -ne 0 ]]; then exit 1 fi @@ -104,7 +104,7 @@ printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 5${IWHT} \ for package in binutils gcc linux-api-headers glibc libstdc++; do source packageinstall.sh 5 $package retval=$? - if [ "$retval" -ne 0 ]; then + if [[ "$retval" -ne 0 ]]; then exit 1 fi done @@ -115,7 +115,7 @@ printf "%b" "\n${IWHT}============ ${IGRN}Building ${IYLW}Chapter 6${IWHT} \ for package in m4 ncurses bash coreutils diffutils file findutils gawk grep gzip make patch sed tar xz binutils gcc; do source packageinstall.sh 6 $package retval=$? - if [ "$retval" -ne 0 ]; then + if [[ "$retval" -ne 0 ]]; then exit 1 fi done |