From 0ac273ea82d63e30955920632a0471f3ae461695 Mon Sep 17 00:00:00 2001 From: Manuel Canales Esparcia Date: Sat, 18 Mar 2006 14:30:43 +0000 Subject: [PATCH] Finished the review of master.sh to match current XSL code. --- HLFS/master.sh | 51 ++++++++++++++------------------------------------ 1 file changed, 14 insertions(+), 37 deletions(-) diff --git a/HLFS/master.sh b/HLFS/master.sh index 2d8a3cd..28a9806 100755 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -416,6 +416,7 @@ chapter7_Makefiles() { # Create a bootable system.. kernel, bootscripts..e # should enter the chroot environment to create the root # password, edit several files and setup Grub. case $this_script in + *usage) continue ;; # Contains example commands *grub) continue ;; *reboot) continue ;; *console) continue ;; # Use the file generated by lfs-bootscripts @@ -423,27 +424,10 @@ chapter7_Makefiles() { # Create a bootable system.. kernel, bootscripts..e *kernel) # If no .config file is supplied, the kernel build is skipped [[ -z $CONFIG ]] && continue - # How does Manuel add this string to the file.. - sed 's|cd \$PKGDIR.*||' -i chapter07/$this_script - # You cannot run menuconfig from within the makefile - sed 's|make menuconfig|make oldconfig|' -i chapter07/$this_script # The files in the conglomeration dir are xxx.bz2 + # What if the user download the original file? sed 's|.patch.gz|.patch.bz2|' -i chapter07/$this_script sed 's|gunzip|bunzip2|' -i chapter07/$this_script - # If defined include the keymap in the kernel - if [[ -n "$KEYMAP" ]]; then - sed "s|^loadkeys -m.*>|loadkeys -m $KEYMAP >|" -i chapter07/$this_script - else - sed '/loadkeys -m/d' -i chapter07/$this_script - sed '/drivers\/char/d' -i chapter07/$this_script - fi - ;; - *usage) # The script bombs, disable error trapping - sed 's|set -e|set +e|' -i chapter07/$this_script - ;; - *profile) # Add the config values to the script - sed "s|LC_ALL=\*\*EDITME.*EDITME\*\*|LC_ALL=$LC_ALL|" -i chapter07/$this_script - sed "s|LANG=\*\*EDITME.*EDITME\*\*|LANG=$LANG|" -i chapter07/$this_script ;; esac @@ -462,11 +446,6 @@ chapter7_Makefiles() { # Create a bootable system.. kernel, bootscripts..e if [[ `_IS_ $this_script bootscripts` ]] ; then vrs=`grep "^lfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` FILE="lfs-bootscripts-$vrs.tar.*" - # The bootscript pkg references both lfs AND blfs bootscripts... - # see XML script for other additions to bootscripts file - # PATCH - vrs=`grep "^blfs-bootscripts-version" $JHALFSDIR/packages | sed -e 's/.* //' -e 's/"//g'` - sed "s|make install$|make install; cd ../blfs-bootscripts-$vrs|" -i chapter07/$this_script wrt_unpack2 "$FILE" ( cat << EOF @@ -570,35 +549,35 @@ EOF # as a dependency. ( cat << EOF -all: chapter4 chapter5 chapter6 chapter7 +all: chapter3 chapter5 chapter6 chapter7 @\$(call echo_finished,$VERSION) -chapter4: 020-creatingtoolsdir 021-addinguser 022-settingenvironment +chapter3: 020-creatingtoolsdir 021-addinguser 022-settingenvironment -chapter5: chapter4 $chapter5 restore-hlfs-env +chapter5: chapter3 $chapter5 restore-lfs-env chapter6: chapter5 $chapter6 chapter7: chapter6 $chapter7 clean-all: clean - rm -rf ./{hlfs-commands,logs,Makefile,dump-hlfs-scripts.xsl,functions,packages,patches} + rm -rf ./{hlfs-commands,logs,Makefile,hlfs.xsl,patcheslist.xsl,functions,packages,patches} -clean: clean-chapter7 clean-chapter6 clean-chapter5 clean-chapter4 +clean: clean-chapter7 clean-chapter6 clean-chapter5 clean-chapter3 -clean-chapter4: - -if [ ! -f user-hlfs-exist ]; then \\ - userdel hlfs; \\ - rm -rf /home/hlfs; \\ +clean-chapter3: + -if [ ! -f user-lfs-exist ]; then \\ + userdel lfs; \\ + rm -rf /home/lfs; \\ fi; rm -rf \$(MOUNT_PT)/tools rm -f /tools - rm -f envars user-hlfs-exist + rm -f envars user-lfs-exist rm -f 02* logs/02*.log clean-chapter5: rm -rf \$(MOUNT_PT)/tools/* - rm -f $chapter5 restore-hlfs-env sources-dir + rm -f $chapter5 restore-lfs-env sources-dir cd logs && rm -f $chapter5 && cd .. clean-chapter6: @@ -615,7 +594,7 @@ clean-chapter7: rm -f $chapter7 cd logs && rm -f $chapter7 && cd .. -restore-hlfs-env: +restore-lfs-env: @\$(call echo_message, Building) @if [ -f /home/lfs/.bashrc.XXX ]; then \\ mv -fv /home/lfs/.bashrc.XXX /home/lfs/.bashrc; \\ @@ -634,5 +613,3 @@ EOF rm $MKFILE.tmp echo "done" } - -