diff options
Diffstat (limited to 'chapter7')
-rw-r--r-- | chapter7/backup.sh | 56 | ||||
-rw-r--r-- | chapter7/bison.sh | 12 | ||||
-rw-r--r-- | chapter7/cleanup.sh | 52 | ||||
-rw-r--r-- | chapter7/gettext.sh | 16 | ||||
-rw-r--r-- | chapter7/libstdc++.sh | 30 | ||||
-rw-r--r-- | chapter7/perl.sh | 32 | ||||
-rw-r--r-- | chapter7/python.sh | 16 | ||||
-rw-r--r-- | chapter7/texinfo.sh | 12 | ||||
-rw-r--r-- | chapter7/util-linux.sh | 36 |
9 files changed, 131 insertions, 131 deletions
diff --git a/chapter7/backup.sh b/chapter7/backup.sh index b903897..8a23a22 100644 --- a/chapter7/backup.sh +++ b/chapter7/backup.sh @@ -1,28 +1,28 @@ -#!/bin/bash -set -e - -file="${LFS_VER}-ch7-backup.tar.xz" -directories=(bin dev etc lib lib64 proc run sbin sys tools usr var) - -if [ -f "${LFS}/sources/chapter7/backup" ]; then - printf "%b" " ${IGRN}Backup previously completed${RST}\n" -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/chapter7/backup.log 2>&1 & pid=$! - spinner "$pid" "${SPINNER}" - retval=$? - if [ "${retval}" -ne 0 ]; then - fail "FAILED!" - exit "${retval}" - else - # shellcheck disable=SC2024 - sudo chown -v "${USER}":"$(id -g)" "${HOME}"/"${file}" >"${LFS}"/sources/log/chapter7/backup.log 2>&1 - success "OK" - fi - popd > /dev/null || exit 1 - - touch "${LFS}/sources/chapter7/backup" -fi +#!/bin/bash
+set -e
+
+file="${LFS_VER}-ch7-backup.tar.xz"
+directories=(bin dev etc lib lib64 proc run sbin sys tools usr var)
+
+if [ -f "${LFS}/sources/chapter7/backup" ]; then
+ printf "%b" " ${IGRN}Backup previously completed${RST}\n"
+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/chapter7/backup.log 2>&1 & pid=$!
+ spinner "$pid" "${SPINNER}"
+ retval=$?
+ if [ "${retval}" -ne 0 ]; then
+ fail "FAILED!"
+ exit "${retval}"
+ else
+ # shellcheck disable=SC2024
+ sudo chown -v "${USER}":"$(id -g)" "${HOME}"/"${file}" >"${LFS}"/sources/log/chapter7/backup.log 2>&1
+ success "OK"
+ fi
+ popd > /dev/null || exit 1
+
+ touch "${LFS}/sources/chapter7/backup"
+fi
diff --git a/chapter7/bison.sh b/chapter7/bison.sh index 9de734e..f0e2a6c 100644 --- a/chapter7/bison.sh +++ b/chapter7/bison.sh @@ -1,6 +1,6 @@ -#!/bin/bash -set -e - -./configure --prefix=/usr --docdir=/usr/share/doc/bison-"${VERSION}" && -make && -make -j1 install +#!/bin/bash
+set -e
+
+./configure --prefix=/usr --docdir=/usr/share/doc/bison-"${VERSION}" &&
+make &&
+make -j1 install
diff --git a/chapter7/cleanup.sh b/chapter7/cleanup.sh index 3e4dfa3..416d07a 100644 --- a/chapter7/cleanup.sh +++ b/chapter7/cleanup.sh @@ -1,26 +1,26 @@ -#!/bin/bash -set -e - -if [ -f "${LFS}/sources/chapter7/cleanup" ]; then - printf "%b" " ${IGRN}Cleanup already performed${RST}\n" -else - - printf "%b" "${GRN}Cleaning up ${YLW}${LFS}${RST}... " - - { - sudo find "${LFS}"/usr/lib -name \*.la -delete - sudo find "${LFS}"/usr/libexec -name \*.la -delete - - sudo rm -rfv "${LFS}"/usr/share/doc - sudo rm -rfv "${LFS}"/usr/share/info - sudo rm -rfv "${LFS}"/usr/share/man - - sudo strip --strip-debug "${LFS}"/usr/lib/* || true - sudo strip --strip-unneeded "${LFS}"/usr/bin/* || true - sudo strip --strip-unneeded "${LFS}"/usr/sbin/* || true - sudo strip --strip-unneeded "${LFS}"/tools/bin/* || true -} >"${LFS}"/sources/log/chapter7/cleanup.log 2>&1 - - success "OK" - sudo touch "${LFS}"/sources/chapter7/cleanup >/dev/null 2>&1 -fi +#!/bin/bash
+set -e
+
+if [ -f "${LFS}/sources/chapter7/cleanup" ]; then
+ printf "%b" " ${IGRN}Cleanup already performed${RST}\n"
+else
+
+ printf "%b" "${GRN}Cleaning up ${YLW}${LFS}${RST}... "
+
+ {
+ sudo find "${LFS}"/usr/lib -name \*.la -delete
+ sudo find "${LFS}"/usr/libexec -name \*.la -delete
+
+ sudo rm -rfv "${LFS}"/usr/share/doc
+ sudo rm -rfv "${LFS}"/usr/share/info
+ sudo rm -rfv "${LFS}"/usr/share/man
+
+ sudo strip --strip-debug "${LFS}"/usr/lib/* || true
+ sudo strip --strip-unneeded "${LFS}"/usr/bin/* || true
+ sudo strip --strip-unneeded "${LFS}"/usr/sbin/* || true
+ sudo strip --strip-unneeded "${LFS}"/tools/bin/* || true
+} >"${LFS}"/sources/log/chapter7/cleanup.log 2>&1
+
+ success "OK"
+ sudo touch "${LFS}"/sources/chapter7/cleanup >/dev/null 2>&1
+fi
diff --git a/chapter7/gettext.sh b/chapter7/gettext.sh index 0e1771d..5c3b164 100644 --- a/chapter7/gettext.sh +++ b/chapter7/gettext.sh @@ -1,8 +1,8 @@ -#!/bin/bash -set -e - -./configure --disable-shared && -make && -cp -v gettext-tools/src/msgfmt /usr/bin && -cp -v gettext-tools/src/msgmerge /usr/bin && -cp -v gettext-tools/src/xgettext /usr/bin +#!/bin/bash
+set -e
+
+./configure --disable-shared &&
+make &&
+cp -v gettext-tools/src/msgfmt /usr/bin &&
+cp -v gettext-tools/src/msgmerge /usr/bin &&
+cp -v gettext-tools/src/xgettext /usr/bin
diff --git a/chapter7/libstdc++.sh b/chapter7/libstdc++.sh index 1a0b5ee..960f686 100644 --- a/chapter7/libstdc++.sh +++ b/chapter7/libstdc++.sh @@ -1,15 +1,15 @@ -#!/bin/bash -set -e - -ln -s gthr-posix.h libgcc/gthr-default.h && -mkdir build -cd build || exit 1 -../libstdc++-v3/configure \ - CXXFLAGS="-g -O2 -D_GNU_SOURCE" \ - --prefix=/usr \ - --disable-multilib \ - --disable-nls \ - --host="$(uname -m)"-lfs-linux-gnu \ - --disable-libstdcxx-pch && -make && -make -j1 install +#!/bin/bash
+set -e
+
+ln -s gthr-posix.h libgcc/gthr-default.h &&
+mkdir build
+cd build || exit 1
+../libstdc++-v3/configure \
+ CXXFLAGS="-g -O2 -D_GNU_SOURCE" \
+ --prefix=/usr \
+ --disable-multilib \
+ --disable-nls \
+ --host="$(uname -m)"-lfs-linux-gnu \
+ --disable-libstdcxx-pch &&
+make &&
+make -j1 install
diff --git a/chapter7/perl.sh b/chapter7/perl.sh index 627e3e5..e3f9865 100644 --- a/chapter7/perl.sh +++ b/chapter7/perl.sh @@ -1,16 +1,16 @@ -#!/bin/bash -set -e - -MAJMIN="$(cut -d\. -f1,2 <<< "${VERSION}")" - -sh Configure -des \ - -Dprefix=/usr \ - -Dvendorprefix=/usr \ - -Dprivlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \ - -Darchlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \ - -Dsitelib=/usr/lib/perl5/"${MAJMIN}"/site_perl \ - -Dsitearch=/usr/lib/perl5/"${MAJMIN}"/site_perl \ - -Dvendorlib=/usr/lib/perl5/"${MAJMIN}"/vendor_perl \ - -Dvendorarch=/usr/lib/perl5/"${MAJMIN}"/vendor_perl && -make && -make -j1 install +#!/bin/bash
+set -e
+
+MAJMIN="$(cut -d\. -f1,2 <<< "${VERSION}")"
+
+sh Configure -des \
+ -Dprefix=/usr \
+ -Dvendorprefix=/usr \
+ -Dprivlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \
+ -Darchlib=/usr/lib/perl5/"${MAJMIN}"/core_perl \
+ -Dsitelib=/usr/lib/perl5/"${MAJMIN}"/site_perl \
+ -Dsitearch=/usr/lib/perl5/"${MAJMIN}"/site_perl \
+ -Dvendorlib=/usr/lib/perl5/"${MAJMIN}"/vendor_perl \
+ -Dvendorarch=/usr/lib/perl5/"${MAJMIN}"/vendor_perl &&
+make &&
+make -j1 install
diff --git a/chapter7/python.sh b/chapter7/python.sh index 428beaa..cb14828 100644 --- a/chapter7/python.sh +++ b/chapter7/python.sh @@ -1,8 +1,8 @@ -#!/bin/bash -set -e - -./configure --prefix=/usr \ - --enable-shared \ - --without-ensurepip && -make && -make -j1 install +#!/bin/bash
+set -e
+
+./configure --prefix=/usr \
+ --enable-shared \
+ --without-ensurepip &&
+make &&
+make -j1 install
diff --git a/chapter7/texinfo.sh b/chapter7/texinfo.sh index b3bba9e..55b530c 100644 --- a/chapter7/texinfo.sh +++ b/chapter7/texinfo.sh @@ -1,6 +1,6 @@ -#!/bin/bash -set -e - -./configure --prefix=/usr && -make && -make -j1 install +#!/bin/bash
+set -e
+
+./configure --prefix=/usr &&
+make &&
+make -j1 install
diff --git a/chapter7/util-linux.sh b/chapter7/util-linux.sh index e0241fa..1628572 100644 --- a/chapter7/util-linux.sh +++ b/chapter7/util-linux.sh @@ -1,18 +1,18 @@ -#!/bin/bash -set -e - -mkdir -p /var/lib/hwclock && -./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \ - --docdir=/usr/share/doc/util-linux-"${VERSION}" \ - --disable-chfn-chsh \ - --disable-login \ - --disable-nologin \ - --disable-su \ - --disable-setpriv \ - --disable-runuser \ - --disable-pylibmount \ - --disable-static \ - --without-python \ - runstatedir=/run && -make && -make -j1 install +#!/bin/bash
+set -e
+
+mkdir -p /var/lib/hwclock &&
+./configure ADJTIME_PATH=/var/lib/hwclock/adjtime \
+ --docdir=/usr/share/doc/util-linux-"${VERSION}" \
+ --disable-chfn-chsh \
+ --disable-login \
+ --disable-nologin \
+ --disable-su \
+ --disable-setpriv \
+ --disable-runuser \
+ --disable-pylibmount \
+ --disable-static \
+ --without-python \
+ runstatedir=/run &&
+make &&
+make -j1 install
|