diff options
Diffstat (limited to 'create-commands.sh')
-rw-r--r-- | create-commands.sh | 645 |
1 files changed, 645 insertions, 0 deletions
diff --git a/create-commands.sh b/create-commands.sh new file mode 100644 index 0000000..f61d0be --- /dev/null +++ b/create-commands.sh @@ -0,0 +1,645 @@ +#!/bin/bash + + +clear + +# Set which arch you want to build +# alpha mips mips64 mips64-64 ppc ppc64 ppc64-64 sparc sparc64 sparc64-64 x86 x86_64 x86_64-64 +ARCH=x86 + +# Double check the CLFS_TARGET variable with the book. +# Books other than x86 won't need this, but set this anyway +# The reason is the book commands expect the user to edit the +# CLFS_TARGET variable for the x86 book. Check if the target book +# requires CLFS_TARGET to be edited. Uncomment if not required. +# Move to the end of the file and uncommend the CLFS_TARGET sed +# If this can be commented and the book commands will set CLFS_TARGET. + +#CLFS_TARGET=i686-pc-linux-gnu + +# Set paper size for GROFF: A4 or letter +PAGE=letter + +#Set ZONEINFO to the time zone file to be copied to /etc/localtime +# /usr/share/zoneinfo/America/Chicago for example. +ZONEINFO=America/Chicago + +CMDSDIR=/mnt/clfs/sources/commands/$ARCH # Directory with dumped book commands +SRCDIR=/mnt/clfs/sources # Directory for the created scripts + +#===========BEGIN VERSION VARIABLES============== +ABOOT=0.9b +ARCLOAD=0.5 +AUTOCONF=2.69 +AUTOMAKE=1.12.4 +BASH=4.2 +BC=1.06.95 +BINUTILS=2.23.2 +BISON=3.0 +BOOTSCRIPTS=2.1-pre1 +BZIP2=1.0.6 +CHECK=0.9.10 +CLOOG=0.18.0 +COLO=1.22 +COREUTILS=8.21 +DEJAGNU=1.5.1 +DHCPCD=6.0.5 +DIFFUTILS=3.3 +DVHTOOL=1.0.1 +E2FSPROGS=1.42.8 +ELFTOAOUT=2.3 +EGLIBC=2.18-r23806 +EGLIBC2=2.18 +EUDEV=1.2 +EXPECT=5.45 +FILE=5.14 +FINDUTILS=4.4.2 +FLEX=2.5.37 +GAWK=4.1.0 +GCC=4.8.1 +GETTEXT=0.18.3.1 +GMP=5.1.2 +GREP=2.14 +GROFF=1.22.2 +GRUB=2.00 +GZIP=1.6 +HFSUTILS=3.2.6 +IANAETC=2.30 +IPROUTE2=3.10.0 +IPUTILS=s20121221 +ISL=0.12.1 +KBD=2.0.0 +KMOD=15 +LESS=460 +LIBEE=0.4.1 +LIBESTR=0.1.5 +LIBTOOL=2.4.2 +LINUX=3.10.9 +M4=1.4.16 +MAKE=3.82 +MAN=1.6g +MANPAGES=3.53 +MPC=1.0.1 +MPFR=3.1.2 +NCURSES=5.9 +PARTED=3.1 +PATCH=2.7.1 +PERL=5.18.1 +PKGCONFIG=lite-0.28-1 +POWERPCUTILS=1.1.3.orig +PROCPS=3.2.8 +PSMISC=22.20 +READLINE=6.2 +RSYSLOG=6.4.2 +SED=4.2.2 +SHADOW=4.1.5.1 +SILO=1.4.14 +SYSVINIT=2.88dsf +TAR=1.26 +TCL=8.6.0 +TEXINFO=4.13a +TEXINFO2=4.13 +UTILLINUX=2.23.2 +VIM=7.4 +VIM2=74 +XZ=5.0.5 +YABOOT=1.3.17 +ZLIB=1.2.8 + +if [ "$ARCH" == "" ]; then + echo "ARCH is not set. Please set a proper ARCH variable." + echo -e "alpha mips mips64 mips64-64 ppc ppc64 sparc sparc64 sparc64-64 x86 x86_64 x86_64-64\n" + exit +fi + +for build in cross-tools temp-system testsuite-tools final-system; do + + if [ -e $SRCDIR/$build.sh ]; then + rm $SRCDIR/$build.sh + fi + + echo -e "#!/bin/bash\n\n" >> $SRCDIR/$build.sh; + echo -e "set -e\n" >> $SRCDIR/$build.sh; + if [ "$build" == "final-system" ]; then + echo -e "set +h\n" >> $SRCDIR/$build.sh; + fi + + if [ "$build" == "cross-tools" -o "$build" == "temp-system" ]; then + echo "source $HOME/.bashrc # this would be the clfs user's .bashrc if following the" >> $SRCDIR/$build.sh; + echo " # CLFS book and using the clfs user." >> $SRCDIR/$build.sh; + fi + + if [ "$build" == "testsuite-tools" -o "$build" == "final-system" ]; then + echo -e "if [ -f /root/.bash_profile ]; then\n source /root/.bash_profile\n # this would be the root user's .bash_profile\n # if following the CLFS book and using the booted root user\n # or chrooted root user during multilib builds.\nfi" >> $SRCDIR/$build.sh; + fi + + echo -e "mkdir -pv $SRCDIR/stamps\n\n" >> $SRCDIR/$build.sh; + + if [ "$build" == "temp-system" ]; then + echo -e "source ~/.bashrc\n" >> $SRCDIR/$build.sh; + fi + + cd $CMDSDIR/$build && + + for file in `echo *`; do + pkg=`echo $file | sed 's/[0-9][0-9][0-9]-//'`; + echo -e "#===========$pkg===============\n" >> $SRCDIR/$build.sh; + echo -e "if [ ! -e \"stamps/$file\" ]; then" >> $SRCDIR/$build.sh; + case "$pkg" in #Insert package extract and cd into source commands + "aboot") + echo "tar xf aboot-$ABOOT.tar.xz && cd aboot-$ABOOT" >> $SRCDIR/$build.sh; + ;; + "arcload") + echo "tar xf arcload-$ARCLOAD.tar.xz && cd arcload-$ARCLOAD" >> $SRCDIR/$build.sh; + ;; + "autoconf") + echo "tar xf autoconf-$AUTOCONF.tar.xz && cd autoconf-$AUTOCONF" >> $SRCDIR/$build.sh; + ;; + "automake") + echo "tar xf automake-$AUTOMAKE.tar.xz && cd automake-$AUTOMAKE" >> $SRCDIR/$build.sh; + ;; + "bash") + echo "tar xf bash-$BASH.tar.xz && cd bash-$BASH" >> $SRCDIR/$build.sh; + ;; + "bc") + echo "tar xf bc-$BC.tar.xz && cd bc-$BC" >> $SRCDIR/$build.sh; + ;; + "binutils") + echo "tar xf binutils-$BINUTILS.tar.xz && cd binutils-$BINUTILS" >> $SRCDIR/$build.sh; + ;; + "bison" | "bison-64bit" | "bison-n32") + echo "tar xf bison-$BISON.tar.xz && cd bison-$BISON" >> $SRCDIR/$build.sh; + ;; + "bootscripts") + echo "tar xf bootscripts-$BOOTSCRIPTS.tar.xz && cd bootscripts-$BOOTSCRIPTS" >> $SRCDIR/$build.sh; + ;; + "bzip2" | "bzip2-64bit" | "bzip2-n32") + echo "tar xf bzip2-$BZIP2.tar.xz && cd bzip2-$BZIP2" >> $SRCDIR/$build.sh; + ;; + "cflags") + echo "sed -i '/unset CFLAGS/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/unset CXXFLAGS/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/CLFS_HOST/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/CLFS_TARGET/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/CLFS_TARGET32/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/CC/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/CXX/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/AR/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/AS/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/RANLIB/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/LD/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/STRIP/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/BUILD32/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/BUILDN32/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/BUILD64/d' ~/.bashrc" >> $SRCDIR/$build.sh; + echo "sed -i '/GCCTARGET/d' ~/.bashrc" >> $SRCDIR/$build.sh; + ;; + "choose") + echo "echo \"If the following command fails, you won't be able to chroot with your host machine. Read the choose to boot or chroot section for more information.\"" >> $SRCDIR/$build.sh; + ;; + "check") + echo "tar xf check-$CHECK.tar.xz && cd check-$CHECK" >> $SRCDIR/$build.sh; + ;; + "cloog" | "cloog-64bit" | "cloog-n32") + echo "tar xf cloog-$CLOOG.tar.xz && cd cloog-$CLOOG" >> $SRCDIR/$build.sh; + ;; + "colo") + echo "tar xf colo-$COLO.tar.xz && cd colo-$COLO" >> $SRCDIR/$build.sh; + ;; + "coreutils") + echo "tar xf coreutils-$COREUTILS.tar.xz && cd coreutils-$COREUTILS" >> $SRCDIR/$build.sh; + ;; + "dejagnu") + echo "tar xf dejagnu-$DEJAGNU.tar.xz && cd dejagnu-$DEJAGNU" >> $SRCDIR/$build.sh; + ;; + "dhcpcd") + echo "tar xf dhcpcd-$DHCPCD.tar.xz && cd dhcpcd-$DHCPCD" >> $SRCDIR/$build.sh; + ;; + "diffutils") + echo "tar xf diffutils-$DIFFUTILS.tar.xz && cd diffutils-$DIFFUTILS" >> $SRCDIR/$build.sh; + ;; + "dvhtool") + echo "tar xf dvhtool_$DVHTOOL.orig.tar.xz && cd dvhtool-$DVHTOOL" >> $SRCDIR/$build.sh; + ;; + "e2fsprogs" | "e2fsprogs-64bit" | "e2fsprogs-n32") + echo "tar xf e2fsprogs-$E2FSPROGS.tar.xz && cd e2fsprogs-$E2FSPROGS" >> $SRCDIR/$build.sh; + ;; + "eglibc" | "eglibc-64" | "eglibc-64bit" | "eglibc-n32") + echo "tar xf eglibc-$EGLIBC.tar.xz && cd eglibc-$EGLIBC2" >> $SRCDIR/$build.sh; + ;; + "elf2aout") + echo "tar xf elf2aout-$ELFTOAOUT.tar.xz && cd elftoaout-$ELFTOAOUT" >> $SRCDIR/$build.sh; + ;; + "eudev" | "eudev-64bit" | "eudev-n32") + echo "tar xf eudev-$EUDEV.tar.xz && cd eudev-$EUDEV" >> $SRCDIR/$build.sh; + ;; + "expect") + echo "tar xf expect$EXPECT.tar.xz && cd expect$EXPECT" >> $SRCDIR/$build.sh; + ;; + "file" | "file-64bit" | "file-n32") + echo "tar xf file-$FILE.tar.xz && cd file-$FILE" >> $SRCDIR/$build.sh; + ;; + "findutils") + echo "tar xf findutils-$FINDUTILS.tar.xz && cd findutils-$FINDUTILS" >> $SRCDIR/$build.sh; + ;; + "flex" | "flex-64bit" | "flex-n32") + echo "tar xf flex-$FLEX.tar.xz && cd flex-$FLEX" >> $SRCDIR/$build.sh; + ;; + "gawk") + echo "tar xf gawk-$GAWK.tar.xz && cd gawk-$GAWK" >> $SRCDIR/$build.sh; + ;; + "gcc" | "gcc-static" | "gcc-final") + echo "tar xf gcc-$GCC.tar.xz && cd gcc-$GCC" >> $SRCDIR/$build.sh; + ;; + "gettext" | "gettext-64bit" | "gettext-n32") + echo "tar xf gettext-$GETTEXT.tar.xz && cd gettext-$GETTEXT" >> $SRCDIR/$build.sh; + ;; + "gmp" | "gmp-64bit" | "gmp-n32") + echo "tar xf gmp-$GMP.tar.xz && cd gmp-$GMP" >> $SRCDIR/$build.sh; + ;; + "grep") + echo "tar xf grep-$GREP.tar.xz && cd grep-$GREP" >> $SRCDIR/$build.sh; + ;; + "groff") + echo "tar xf groff-$GROFF.tar.xz && cd groff-$GROFF" >> $SRCDIR/$build.sh; + ;; + "grub") + echo "tar xf grub-$GRUB.tar.xz && cd grub-$GRUB" >> $SRCDIR/$build.sh; + ;; + "gzip") + echo "tar xf gzip-$GZIP.tar.xz && cd gzip-$GZIP" >> $SRCDIR/$build.sh; + ;; + "hfsutils") + echo "tar xf hfsutils-$HFSUTILS.tar.xz && cd hfsutils-$HFSUTILS" >> $SRCDIR/$build.sh; + ;; + "iana-etc") + echo "tar xf iana-etc-$IANAETC.tar.xz && cd iana-etc-$IANAETC" >> $SRCDIR/$build.sh; + ;; + "iproute2") + echo "tar xf iproute2-$IPROUTE2.tar.xz && cd iproute2-$IPROUTE2" >> $SRCDIR/$build.sh; + ;; + "iputils") + echo "tar xf iputils-$IPUTILS.tar.xz && cd iputils-$IPUTILS" >> $SRCDIR/$build.sh; + ;; + "isl" | "isl-64bit" | "isl-n32") + echo "tar xf isl-$ISL.tar.xz && cd isl-$ISL" >> $SRCDIR/$build.sh; + ;; + "kbd") + echo "tar xf kbd-$KBD.tar.xz && cd kbd-$KBD" >> $SRCDIR/$build.sh; + ;; + "kmod" | "kmod-64bit" | "kmod-n32") + echo "tar xf kmod-$KMOD.tar.xz && cd kmod-$KMOD" >> $SRCDIR/$build.sh; + ;; + "less") + echo "tar xf less-$LESS.tar.xz && cd less-$LESS" >> $SRCDIR/$build.sh; + ;; + "libee" | "libee-64bit" | "libee-n32") + echo "tar xf libee-$LIBEE.tar.xz && cd libee-$LIBEE" >> $SRCDIR/$build.sh; + ;; + "libestr" | "libestr-64bit" | "libestr-n32") + echo "tar xf libestr-$LIBESTR.tar.xz && cd libestr-$LIBESTR" >> $SRCDIR/$build.sh; + ;; + "libtool" | "libtool-64bit" | "libtool-n32") + echo "tar xf libtool-$LIBTOOL.tar.xz && cd libtool-$LIBTOOL" >> $SRCDIR/$build.sh; + ;; + "linux" | "linux-headers") + echo "tar xf linux-$LINUX.tar.xz && cd linux-$LINUX" >> $SRCDIR/$build.sh; + ;; + "m4") + echo "tar xf m4-$M4.tar.xz && cd m4-$M4" >> $SRCDIR/$build.sh; + ;; + "make") + echo "tar xf make-$MAKE.tar.xz && cd make-$MAKE" >> $SRCDIR/$build.sh; + ;; + "man") + echo "tar xf man-$MAN.tar.xz && cd man-$MAN" >> $SRCDIR/$build.sh; + ;; + "man-pages") + echo "tar xf man-pages-$MANPAGES.tar.xz && cd man-pages-$MANPAGES" >> $SRCDIR/$build.sh; + ;; + "mpc" | "mpc-64bit" | "mpc-n32") + echo "tar xf mpc-$MPC.tar.xz && cd mpc-$MPC" >> $SRCDIR/$build.sh; + ;; + "mpfr" | "mpfr-64bit" | "mpfr-n32") + echo "tar xf mpfr-$MPFR.tar.xz && cd mpfr-$MPFR" >> $SRCDIR/$build.sh; + ;; + "ncurses" | "ncurses-64bit" | "ncurses-n32") + echo "tar xf ncurses-$NCURSES.tar.xz && cd ncurses-$NCURSES" >> $SRCDIR/$build.sh; + ;; + "parted") + echo "tar xf parted-$PARTED.tar.xz && cd parted-$PARTED" >> $SRCDIR/$build.sh; + ;; + "powerpc-utils") + echo "tar xf powerpc-utils_$POWERPCUTILS.tar.xz && cd pmac-utils" >> $SRCDIR/$build.sh; + ;; + "patch") + echo "tar xf patch-$PATCH.tar.xz && cd patch-$PATCH" >> $SRCDIR/$build.sh; + ;; + "perl" | "perl-64bit" | "perl-n32" | "temp-perl") + echo "tar xf perl-$PERL.tar.xz && cd perl-$PERL" >> $SRCDIR/$build.sh; + ;; + "pkg-config") + echo "tar xf pkg-config-$PKGCONFIG.tar.xz && cd pkg-config-$PKGCONFIG" >> $SRCDIR/$build.sh; + ;; + "procps" | "procps-64bit" | "procps-n32") + echo "tar xf procps-$PROCPS.tar.xz && cd procps-$PROCPS" >> $SRCDIR/$build.sh; + ;; + "psmisc") + echo "tar xf psmisc-$PSMISC.tar.xz && cd psmisc-$PSMISC" >> $SRCDIR/$build.sh; + ;; + "readline" | "readline-64bit" | "readline-n32") + echo "tar xf readline-$READLINE.tar.xz && cd readline-$READLINE" >> $SRCDIR/$build.sh; + ;; + "rsyslog") + echo "tar xf rsyslog-$RSYSLOG.tar.xz && cd rsyslog-$RSYSLOG" >> $SRCDIR/$build.sh; + ;; + "sed") + echo "tar xf sed-$SED.tar.xz && cd sed-$SED" >> $SRCDIR/$build.sh; + ;; + "shadow") + echo "tar xf shadow-$SHADOW.tar.xz && cd shadow-$SHADOW" >> $SRCDIR/$build.sh; + ;; + "silo") + echo "tar xf silo-$SILO.tar.xz && cd silo-$SILO" >> $SRCDIR/$build.sh; + ;; + "sysvinit") + echo "tar xf sysvinit-$SYSVINIT.tar.xz && cd sysvinit-$SYSVINIT" >> $SRCDIR/$build.sh; + ;; + "tar") + echo "tar xf tar-$TAR.tar.xz && cd tar-$TAR" >> $SRCDIR/$build.sh; + ;; + "tcl") + echo "tar xf tcl${TCL}-src.tar.xz && cd tcl$TCL" >> $SRCDIR/$build.sh; + ;; + "texinfo") + echo "tar xf texinfo-$TEXINFO.tar.xz && cd texinfo-$TEXINFO2" >> $SRCDIR/$build.sh; + ;; + "util-linux" | "util-linux-64bit" | "util-linux-n32") + echo "tar xf util-linux-$UTILLINUX.tar.xz && cd util-linux-$UTILLINUX" >> $SRCDIR/$build.sh; + ;; + "vim") + echo "tar xf vim-$VIM.tar.xz && cd vim$VIM2" >> $SRCDIR/$build.sh; + ;; + "xz" | "xz-64bit" | "xz-n32") + echo "tar xf xz-$XZ.tar.xz && cd xz-$XZ" >> $SRCDIR/$build.sh; + ;; + "yaboot") + echo "tar xf yaboot-$YABOOT.tar.xz && cd yaboot-$YABOOT" >> $SRCDIR/$build.sh; + ;; + "zlib" | "zlib-64bit" | "zlib-n32") + echo "tar xf zlib-$ZLIB.tar.xz && cd zlib-$ZLIB" >> $SRCDIR/$build.sh; + ;; + esac + + cat $file >> $SRCDIR/$build.sh; + + case "$pkg" in #Insert source / build directory removal commands + "aboot") + echo "cd .. && rm -rf aboot-$ABOOT" >> $SRCDIR/$build.sh; + ;; + "arcload") + echo "cd .. && rm -rf arcload-$ARCLOAD" >> $SRCDIR/$build.sh; + ;; + "autoconf") + echo "cd .. && rm -rf autoconf-$AUTOCONF" >> $SRCDIR/$build.sh; + ;; + "automake") + echo "cd .. && rm -rf automake-$AUTOMAKE" >> $SRCDIR/$build.sh; + ;; + "bash") + echo "cd .. && rm -rf bash-$BASH" >> $SRCDIR/$build.sh; + ;; + "bc") + echo "cd .. && rm -rf bc-$BC" >> $SRCDIR/$build.sh; + ;; + "binutils") + echo "cd .. && rm -rf binutils-$BINUTILS binutils-build" >> $SRCDIR/$build.sh; + ;; + "bison" | "bison-64bit" | "bison-n32") + echo "cd .. && rm -rf bison-$BISON" >> $SRCDIR/$build.sh; + ;; + "bootscripts") + echo "cd .. && rm -rf bootscripts-$BOOTSCRIPTS" >> $SRCDIR/$build.sh; + ;; + "bzip2" | "bzip2-64bit" | "bzip2-n32") + echo "cd .. && rm -rf bzip2-$BZIP2" >> $SRCDIR/$build.sh; + ;; + "check") + echo "cd .. && rm -rf check-$CHECK" >> $SRCDIR/$build.sh; + ;; + "cloog" | "cloog-64bit" | "cloog-n32") + echo "cd .. && rm -rf cloog-$CLOOG" >> $SRCDIR/$build.sh; + ;; + "colo") + echo "cd .. && rm -rf colo-$COLO" >> $SRCDIR/$build.sh; + ;; + "coreutils") + echo "cd .. && rm -rf coreutils-$COREUTILS" >> $SRCDIR/$build.sh; + ;; + "dejagnu") + echo "cd .. && rm -rf dejagnu-$DEJAGNU" >> $SRCDIR/$build.sh; + ;; + "dhcpcd") + echo "cd .. && rm -rf dhcpcd-$DHCPCD" >> $SRCDIR/$build.sh; + ;; + "diffutils") + echo "cd .. && rm -rf diffutils-$DIFFUTILS" >> $SRCDIR/$build.sh; + ;; + "dvhtool") + echo "cd .. && rm -rf dvhtool-$DVHTOOL.orig" >> $SRCDIR/$build.sh; + ;; + "e2fsprogs" | "e2fsprogs-64bit" | "e2fsprogs-n32") + echo "cd ../../ && rm -rf e2fsprogs-$E2FSPROGS" >> $SRCDIR/$build.sh + ;; + "eglibc" | "eglibc-64" | "eglibc-64bit" | "eglibc-n32") + echo "cd .. && rm -rf eglibc-$EGLIBC2 eglibc-build" >> $SRCDIR/$build.sh; + ;; + "elftoaout") + echo "cd .. && rm -rf elftoaout-$ELFTOAOUT" >> $SRCDIR/$build.sh; + ;; + "eudev" | "eudev-64bit" | "eudev-n32") + echo "cd .. && rm -rf eudev-$EUDEV" >> $SRCDIR/$build.sh; + ;; + "expect") + echo "cd .. && rm -rf expect$EXPECT" >> $SRCDIR/$build.sh; + ;; + "file" | "file-64bit" | "file-n32") + echo "cd .. && rm -rf file-$FILE" >> $SRCDIR/$build.sh; + ;; + "findutils") + echo "cd .. && rm -rf findutils-$FINDUTILS" >> $SRCDIR/$build.sh; + ;; + "flex" | "flex-64bit" | "flex-n32") + echo "cd .. && rm -rf flex-$FLEX" >> $SRCDIR/$build.sh; + ;; + "gawk") + echo "cd .. && rm -rf gawk-$GAWK" >> $SRCDIR/$build.sh; + ;; + "gcc" | "gcc-static" | "gcc-final") + echo "cd .. && rm -rf gcc-$GCC gcc-build" >> $SRCDIR/$build.sh; + ;; + "gettext" | "gettext-64bit" | "gettext-n32") + if [ "$build" == "temp-system" ]; then + echo "cd ../../ && rm -rf gettext-$GETTEXT" >> $SRCDIR/$build.sh; + else + echo "cd .. && rm -rf gettext-$GETTEXT" >> $SRCDIR/$build.sh; + fi + ;; + "gmp" | "gmp-64bit" | "gmp-n32") + echo "cd .. && rm -rf gmp-$GMP" >> $SRCDIR/$build.sh; + ;; + "grep") + echo "cd .. && rm -rf grep-$GREP" >> $SRCDIR/$build.sh; + ;; + "groff") + echo "cd .. && rm -rf groff-$GROFF" >> $SRCDIR/$build.sh; + ;; + "grub") + echo "cd .. && rm -rf grub-$GRUB" >> $SRCDIR/$build.sh; + ;; + "gzip") + echo "cd .. && rm -rf gzip-$GZIP" >> $SRCDIR/$build.sh; + ;; + "hfsutils") + echo "cd .. && rm -rf hfsutils-$HFSUTILS" >> $SRCDIR/$build.sh; + ;; + "iana-etc") + echo "cd .. && rm -rf iana-etc-$IANAETC" >> $SRCDIR/$build.sh; + ;; + "iproute2") + echo "cd .. && rm -rf iproute2-$IPROUTE2" >> $SRCDIR/$build.sh; + ;; + "iputils") + echo "cd .. && rm -rf iputils-$IPUTILS" >> $SRCDIR/$build.sh; + ;; + "isl" | "isl-64bit" | "isl-n32") + echo "cd .. && rm -rf isl-$ISL" >> $SRCDIR/$build.sh; + ;; + "kbd") + echo "cd .. && rm -rf kbd-$KBD" >> $SRCDIR/$build.sh; + ;; + "kmod" | "kmod-64bit" | "kmod-n32") + echo "cd .. && rm -rf kmod-$KMOD" >> $SRCDIR/$build.sh; + ;; + "less") + echo "cd .. && rm -rf less-$LESS" >> $SRCDIR/$build.sh; + ;; + "libee" | "libee-64bit" | "libee-n32") + echo "cd .. && rm -rf libee-$LIBEE" >> $SRCDIR/$build.sh; + ;; + "libestr" | "libestr-64bit" | "libestr-n32") + echo "cd .. && rm -rf libestr-$LIBESTR" >> $SRCDIR/$build.sh; + ;; + "libtool" | "libtool-64bit" | "libtool-n32") + echo "cd .. && rm -rf libtool-$LIBTOOL" >> $SRCDIR/$build.sh; + ;; + "linux" | "linux-headers") + echo "cd .. && rm -rf linux-$LINUX" >> $SRCDIR/$build.sh; + ;; + "m4") + echo "cd .. && rm -rf m4-$M4" >> $SRCDIR/$build.sh; + ;; + "make") + echo "cd .. && rm -rf make-$MAKE" >> $SRCDIR/$build.sh; + ;; + "man") + echo "cd .. && rm -rf man-$MAN" >> $SRCDIR/$build.sh; + ;; + "man-pages") + echo "cd .. && rm -rf man-pages-$MANPAGES" >> $SRCDIR/$build.sh; + ;; + "mpc" | "mpc-64bit" | "mpc-n32") + echo "cd .. && rm -rf mpc-$MPC" >> $SRCDIR/$build.sh; + ;; + "mpfr" | "mpfr-64bit" | "mpfr-n32") + echo "cd .. && rm -rf mpfr-$MPFR" >> $SRCDIR/$build.sh; + ;; + "ncurses" | "ncurses-64bit" | "ncurses-n32") + echo "cd .. && rm -rf ncurses-$NCURSES" >> $SRCDIR/$build.sh; + ;; + "parted") + echo "cd .. && rm -rf parted-$PARTED" >> $SRCDIR/$build.sh; + ;; + "powerpc-utils") + echo "cd .. && rm -rf pmac-utils" >> $SRCDIR/$build.sh; + ;; + "patch") + echo "cd .. && rm -rf patch-$PATCH" >> $SRCDIR/$build.sh; + ;; + "perl" | "perl-64bit" | "perl-n32" | "temp-perl") + echo "cd .. && rm -rf perl-$PERL" >> $SRCDIR/$build.sh; + ;; + "pkg-config") + echo "cd .. && rm -rf pkg-config-$PKGCONFIG" >> $SRCDIR/$build.sh; + ;; + "procps" | "procps-64bit" | "procps-n32") + echo "cd .. && rm -rf procps-$PROCPS" >> $SRCDIR/$build.sh; + ;; + "psmisc") + echo "cd .. && rm -rf psmisc-$PSMISC" >> $SRCDIR/$build.sh; + ;; + "readline" | "readline-64bit" | "readline-n32") + echo "cd .. && rm -rf readline-$READLINE" >> $SRCDIR/$build.sh; + ;; + "rsyslog") + echo "cd .. && rm -rf rsyslog-$RSYSLOG" >> $SRCDIR/$build.sh; + ;; + "sed") + echo "cd .. && rm -rf sed-$SED" >> $SRCDIR/$build.sh; + ;; + "shadow") + echo "cd .. && rm -rf shadow-$SHADOW" >> $SRCDIR/$build.sh; + ;; + "silo") + echo "cd .. && rm -rf silo-$SILO" >> $SRCDIR/$build.sh; + ;; + "sysvinit") + echo "cd .. && rm -rf sysvinit-$SYSVINIT" >> $SRCDIR/$build.sh; + ;; + "tar") + echo "cd .. && rm -rf tar-$TAR" >> $SRCDIR/$build.sh; + ;; + "tcl") + echo "cd ../../ && rm -rf tcl$TCL" >> $SRCDIR/$build.sh; + ;; + "texinfo") + echo "cd .. && rm -rf texinfo-$TEXINFO2" >> $SRCDIR/$build.sh; + ;; + "util-linux" | "util-linux-64bit" | "util-linux-n32") + echo "cd .. && rm -rf util-linux-$UTILLINUX" >> $SRCDIR/$build.sh; + ;; + "vim") + echo "cd .. && rm -rf vim$VIM2" >> $SRCDIR/$build.sh; + ;; + "xz" | "xz-64bit" | "xz-n32") + echo "cd .. && rm -rf xz-$XZ" >> $SRCDIR/$build.sh; + ;; + "yaboot") + echo "cd .. && rm -rf yaboot-$YABOOT" >> $SRCDIR/$build.sh; + ;; + "zlib" | "zlib-64bit" | "zlib-n32") + echo "cd .. && rm -rf zlib-$ZLIB" >> $SRCDIR/$build.sh; + ;; + esac + + echo -e "touch \"stamps/${file}\"" >> $SRCDIR/$build.sh; + echo -e "fi\n" >> $SRCDIR/$build.sh; + done + +done + +sed -i 's@/mnt/clfs@@g' $SRCDIR/{testsuite-tools,final-system}.sh + +# comment the following line if the book being used sets CLFS_TARGET +#sed -i "s@\[target triplet\]@$CLFS_TARGET@" $SRCDIR/cross-tools.sh; +echo "Setting ZONEINFO for eglibc in final-system.sh"; +sed -i "s@\*\*EDITME\[xxx\]EDITME\*\*@$ZONEINFO@" $SRCDIR/final-system.sh; +echo "Setting PAGE for groff paper size in final-system.sh"; +sed -i "s@\*\*EDITME\[paper_size\]EDITME\*\*@$PAGE@" $SRCDIR/final-system.sh; +echo -e "\nVerify CLFS_TARGET is correct in cross-tools.sh" +echo -e "\n Verify ZONEINFO data file is correct at eglibc in final-system.sh"; +echo -e "\n Verify PAGE paper size is correct at groff in final-system.sh"; +echo -e "\n Check GMP page in chapter 10 and gmp section in finalsystem.sh"; +echo -e "\n If you don't want checks, remove those commands from final-system.sh"; + +echo -e "echo \"Do not forget to set the root password before booting into your new systems. See the shadow instruction page at chapter 10 in the book.\"" >> $SRCDIR/final-system.sh; |