mirror of
https://github.com/YellowJacketLinux/lfs-buildscripts.git
synced 2025-01-23 05:52:21 +08:00
clean up directories after build
This commit is contained in:
parent
aac32fba12
commit
c5b37860e6
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d m4-${m4_version} ] && rm -rf m4-${m4_version}
|
||||
|
||||
@ -32,4 +32,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing m4"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf m4-${m4_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d ncurses-${ncurses_version} ] && rm -rf ncurses-${ncurses_version}
|
||||
|
||||
@ -54,4 +54,12 @@ ln -sv libncursesw.so ${LFS}/usr/lib/libncurses.so
|
||||
sed -e 's/^#if.*XOPEN.*$/#if 1/' \
|
||||
-i ${LFS}/usr/include/curses.h
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf ncurses-${ncurses_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d bash-${bash_version} ] && rm -rf bash-${bash_version}
|
||||
|
||||
@ -36,4 +36,12 @@ fi
|
||||
|
||||
ln -s bash ${LFS}/bin/sh
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf bash-${bash_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d coreutils-${coreutils_version} ] && rm -rf coreutils-${coreutils_version}
|
||||
|
||||
@ -39,5 +39,12 @@ mkdir -p ${LFS}/usr/share/man/man8
|
||||
mv ${LFS}/usr/share/man/man1/chroot.1 ${LFS}/usr/share/man/man8/chroot.8
|
||||
sed -i 's/"1"/"8"/' ${LFS}/usr/share/man/man8/chroot.8
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf coreutils-${coreutils_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d diffutils-${diffutils_version} ] && rm -rf diffutils-${diffutils_version}
|
||||
|
||||
@ -32,4 +32,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing diffutils"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf diffutils-${diffutils_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d file-${file_version} ] && rm -rf file-${file_version}
|
||||
|
||||
@ -45,8 +45,17 @@ fi
|
||||
make DESTDIR=${LFS} install
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing libstdc++"
|
||||
myfail "Failed installing file"
|
||||
fi
|
||||
|
||||
rm -f ${LFS}/usr/lib/libmagic.la
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf file-${file_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d findutils-${findutils_version} ] && rm -rf findutils-${findutils_version}
|
||||
|
||||
@ -33,4 +33,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing findutils"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf findutils-${findutils_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d gawk-${gawk_version} ] && rm -rf gawk-${gawk_version}
|
||||
|
||||
@ -34,4 +34,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing gawk"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf gawk-${gawk_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d grep-${grep_version} ] && rm -rf grep-${grep_version}
|
||||
|
||||
@ -32,4 +32,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing grep"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf grep-${grep_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d gzip-${gzip_version} ] && rm -rf gzip-${gzip_version}
|
||||
|
||||
@ -31,4 +31,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing gzip"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf gzip-${gzip_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d make-${make_version} ] && rm -rf make-${make_version}
|
||||
|
||||
@ -33,4 +33,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing make"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf make-${make_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d patch-${patch_version} ] && rm -rf patch-${patch_version}
|
||||
|
||||
@ -32,4 +32,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing patch"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf patch-${patch_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d sed-${sed_version} ] && rm -rf sed-${sed_version}
|
||||
|
||||
@ -32,4 +32,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing sed"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf sed-${sed_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d tar-${tar_version} ] && rm -rf tar-${tar_version}
|
||||
|
||||
@ -32,4 +32,12 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing tar"
|
||||
fi
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf tar-${tar_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d xz-${xz_version} ] && rm -rf xz-${xz_version}
|
||||
|
||||
@ -36,4 +36,12 @@ fi
|
||||
|
||||
rm -v ${LFS}/usr/lib/liblzma.la
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf xz-${xz_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d binutils-${binutils_version} ] && rm -rf binutils-${binutils_version}
|
||||
|
||||
@ -43,7 +43,14 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing binutils"
|
||||
fi
|
||||
|
||||
rm -v ${LFS}/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la}
|
||||
rm ${LFS}/usr/lib/lib{bfd,ctf,ctf-nobfd,opcodes,sframe}.{a,la}
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf binutils-${binutils_version}
|
||||
|
||||
popd
|
||||
|
@ -10,7 +10,7 @@ if [ "`whoami`" != "lfs" ]; then
|
||||
myfail "Must run this script as lfs user"
|
||||
fi
|
||||
|
||||
pushd $GLSOURCES > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
pushd ${GLSOURCES} > /dev/null 2>&1 || myfail "Failed to move to ${GLSOURCES}"
|
||||
|
||||
[ -d gcc-${gcc_version} ] && rm -rf gcc-${gcc_version}
|
||||
|
||||
@ -44,7 +44,7 @@ mkdir build && cd build
|
||||
--build=$(../config.guess) \
|
||||
--host=${LFS_TGT} \
|
||||
--target=${LFS_TGT} \
|
||||
LDFLAGS_FOR_TARGET=-L$PWD/$LFS_TGT/libgcc \
|
||||
LDFLAGS_FOR_TARGET=-L${PWD}/${LFS_TGT}/libgcc \
|
||||
--prefix=/usr \
|
||||
--with-build-sysroot=${LFS} \
|
||||
--enable-default-pie \
|
||||
@ -72,4 +72,14 @@ if [ $? -ne 0 ]; then
|
||||
myfail "Failed installing gcc pass2"
|
||||
fi
|
||||
|
||||
ln -sv gcc $LFS/usr/bin/cc
|
||||
ln -sv gcc ${LFS}/usr/bin/cc
|
||||
|
||||
popd
|
||||
|
||||
# cleanup
|
||||
|
||||
pushd ${GLSOURCES}
|
||||
|
||||
rm -rf gcc-${gcc_version}
|
||||
|
||||
popd
|
||||
|
@ -8,7 +8,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.01-m4.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 M4 Complete"
|
||||
echo "LFS Chapter 6 M4 Complete [1/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -18,7 +18,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.02-ncurses.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Ncurses Complete"
|
||||
echo "LFS Chapter 6 Ncurses Complete [2/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -28,7 +28,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.03-bash.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Bash Complete"
|
||||
echo "LFS Chapter 6 Bash Complete [3/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -38,7 +38,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.04-coreutils.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Coreutils Complete"
|
||||
echo "LFS Chapter 6 Coreutils Complete [4/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -48,7 +48,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.05-diffutils.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Diffutils Complete"
|
||||
echo "LFS Chapter 6 Diffutils Complete [5/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -58,7 +58,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.06-file.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 File Complete"
|
||||
echo "LFS Chapter 6 File Complete [6/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -68,7 +68,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.07-findutils.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Findutils Complete"
|
||||
echo "LFS Chapter 6 Findutils Complete [7/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -78,7 +78,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.08-gawk.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Gawk Complete"
|
||||
echo "LFS Chapter 6 Gawk Complete [8/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -88,7 +88,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.09-grep.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Grep Complete"
|
||||
echo "LFS Chapter 6 Grep Complete [9/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -98,7 +98,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.10-gzip.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Gzip Complete"
|
||||
echo "LFS Chapter 6 Gzip Complete [10/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -108,7 +108,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.11-make.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Make Complete"
|
||||
echo "LFS Chapter 6 Make Complete [11/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -118,7 +118,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.12-patch.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Patch Complete"
|
||||
echo "LFS Chapter 6 Patch Complete [12/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -128,7 +128,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.13-sed.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Sed Complete"
|
||||
echo "LFS Chapter 6 Sed Complete [13/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -138,7 +138,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.14-tar.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Tar Complete"
|
||||
echo "LFS Chapter 6 Tar Complete [14/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -148,7 +148,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.15-xz.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Xz Complete"
|
||||
echo "LFS Chapter 6 Xz Complete [15/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -158,7 +158,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.16-binutils-pass2.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 Binutils Pass 2 Complete"
|
||||
echo "LFS Chapter 6 Binutils Pass 2 Complete [16/17]"
|
||||
sleep 3
|
||||
fi
|
||||
|
||||
@ -168,7 +168,7 @@ if [ $? -ne 0 ]; then
|
||||
echo "failed CH06.17-gcc-pass2.sh"
|
||||
exit 1
|
||||
else
|
||||
echo "LFS Chapter 6 GCC Pass 2 Complete"
|
||||
echo "LFS Chapter 6 GCC Pass 2 Complete [17/17]"
|
||||
sleep 120
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user