diff options
-rw-r--r-- | chapter8/backup.sh | 2 | ||||
-rw-r--r-- | chapter8/bash.sh | 1 | ||||
-rw-r--r-- | chapter8/bzip2.sh | 1 | ||||
-rw-r--r-- | chapter8/cleanup.sh | 8 | ||||
-rw-r--r-- | chapter8/findutils.sh | 1 | ||||
-rw-r--r-- | chapter8/glibc.sh | 1 | ||||
-rw-r--r-- | chapter8/ninja.sh | 1 | ||||
-rw-r--r-- | chapter8/shadow.sh | 2 |
8 files changed, 15 insertions, 2 deletions
diff --git a/chapter8/backup.sh b/chapter8/backup.sh index 57b356d..8d750c5 100644 --- a/chapter8/backup.sh +++ b/chapter8/backup.sh @@ -9,6 +9,7 @@ else printf "%b" "${GRN}Backing up ${YLW}${LFS}${GRN} to ${YLW}${file}${RST}... " pushd "${LFS}" > /dev/null || exit 1 + # shellcheck disable=SC2024 sudo XZ_OPTS="-T${NUMPROCS} -e" tar cJvpf "${HOME}"/"${file}" "${directories[@]}" >"${LFS}"/sources/log/chapter8/backup.log 2>&1 & pid=$! spinner "$pid" "${SPINNER}" retval=$? @@ -16,6 +17,7 @@ else printf "%b" "${IRED}FAILED!${RST}\n" exit "${retval}" else + # shellcheck disable=SC2024 sudo chown -v "${USER}":"$(id -g)" "${HOME}"/"${file}" >"${LFS}"/sources/log/chapter8/backup.log 2>&1 printf "%b" "${IGRN}OK${RST}\n" fi diff --git a/chapter8/bash.sh b/chapter8/bash.sh index 65eb2d8..b4ca0c2 100644 --- a/chapter8/bash.sh +++ b/chapter8/bash.sh @@ -2,6 +2,7 @@ patch -Np1 -i ../bash-"${VERSION}"-fixes-1.patch +# shellcheck disable=SC2016 sed -i '/^bashline.o:.*shmbchar.h/a bashline.o: ${DEFDIR}/builtext.h' Makefile.in ./configure --prefix=/usr \ diff --git a/chapter8/bzip2.sh b/chapter8/bzip2.sh index b1b4459..81b111e 100644 --- a/chapter8/bzip2.sh +++ b/chapter8/bzip2.sh @@ -2,6 +2,7 @@ patch -Np1 -i ../bzip2-"${VERSION}"-install_docs-1.patch +# shellcheck disable=SC2016 sed -i 's@\(ln -s -f \)$(PREFIX)/bin/@\1@' Makefile sed -i "s@(PREFIX)/man@(PREFIX)/share/man@g" Makefile diff --git a/chapter8/cleanup.sh b/chapter8/cleanup.sh index 46c152d..ed62e18 100644 --- a/chapter8/cleanup.sh +++ b/chapter8/cleanup.sh @@ -26,7 +26,7 @@ else # Place debugging symbols for selected libraries in seprate files save_lib="ld-2.33.so libc-2.33.so libpthread-2.33.so libthread_db-1.0.so" - cd "${LFS}"/lib || exit 1 + pushd "${LFS}"/lib || exit 1 for LIB in $save_lib; do sudo objcopy --only-keep-debug "${LIB}" "${LIB}".dbg @@ -34,9 +34,11 @@ else sudo objcopy --add-gnu-debuglink="${LIB}".dbg "${LIB}" done + popd || exit 1 + save_usrlib="libquadmath.so.0.0.0 libstdc++.so.6.0.28 libitm.so.1.0.0 libatomic.so.1.2.0" - cd "${LFS}"/usr/lib || exit 1 + pushd "${LFS}"/usr/lib || exit 1 for LIB in $save_usrlib; do sudo objcopy --only-keep-debug "${LIB}" "${LIB}".dbg @@ -44,6 +46,8 @@ else sudo objcopy --add-gnu-debuglink="${LIB}".dbg "${LIB}" done + popd || exit 1 + sudo find "${LFS}"/usr/lib -type f -name \*.a -exec strip --strip-debug {} ';' sudo find "${LFS}"/lib -type f -name \*.so* ! -name \*dbg -exec strip --strip-unneeded {} ';' sudo find "${LFS}"/usr/lib -type f -name \*.so* ! -name \*dbg -exec strip --strip-unneeded {} ';' diff --git a/chapter8/findutils.sh b/chapter8/findutils.sh index b058eea..8203619 100644 --- a/chapter8/findutils.sh +++ b/chapter8/findutils.sh @@ -7,4 +7,5 @@ make make -j1 install mv -v /usr/bin/find /bin +# shellcheck disable=SC2016 sed -i 's|find:=${BINDIR}|find:=/bin|' /usr/bin/updatedb diff --git a/chapter8/glibc.sh b/chapter8/glibc.sh index 21289b1..6f6289c 100644 --- a/chapter8/glibc.sh +++ b/chapter8/glibc.sh @@ -19,6 +19,7 @@ make PARALLELMFLAGS="${MAKEFLAGS}" touch /etc/ld.so.conf +# shellcheck disable=SC2016 sed '/test-installation/s@$(PERL)@echo not running@' -i ../Makefile make -j1 install diff --git a/chapter8/ninja.sh b/chapter8/ninja.sh index 3f93e56..744dffc 100644 --- a/chapter8/ninja.sh +++ b/chapter8/ninja.sh @@ -2,6 +2,7 @@ export NINJAJOBS=4 +# shellcheck disable=SC1004 sed -i '/int Guess/a \ int j = 0;\ char* jobs = getenv( "NINJAJOBS" );\ diff --git a/chapter8/shadow.sh b/chapter8/shadow.sh index f0254de..3e2bdd5 100644 --- a/chapter8/shadow.sh +++ b/chapter8/shadow.sh @@ -1,7 +1,9 @@ #!/bin/bash +# shellcheck disable=SC2016 ROOTPW='$1$5RPAAd$oejpw8ErihLIB7vmGE4SV1' +# shellcheck disable=SC2016 sed -i 's/groups$(EXEEXT) //' src/Makefile.in find man -name Makefile.in -exec sed -i 's/groups\.1 / /' {} \; find man -name Makefile.in -exec sed -i 's/getspnam\.3 / /' {} \; |