diff --git a/CLFS/master.sh b/CLFS/master.sh index bffecbb..9d8c2b1 100755 --- a/CLFS/master.sh +++ b/CLFS/master.sh @@ -131,7 +131,7 @@ cross_tools_Makefiles() { # # # If $vrs isn't empty, we've got a package... # - [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp + [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" # wrt_run_as_su "${this_script}" "${file}" # @@ -183,7 +183,7 @@ temptools_Makefiles() { # # If $vrs isn't empty, we've got a package... # Insert instructions for unpacking the package and to set the PKGDIR variable. # - [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp + [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" # wrt_run_as_su "${this_script}" "${file}" # @@ -254,7 +254,7 @@ boot_Makefiles() { # # If $vrs isn't empty, we've got a package... # Insert instructions for unpacking the package and changing directories # - [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" && echo -e '\ttrue' >> $MKFILE.tmp + [[ "$vrs" != "" ]] && wrt_unpack "$name-$vrs.tar.*" # # Select a script execution method case $this_script in @@ -322,11 +322,8 @@ chroot_Makefiles() { # # if [ "$vrs" != "" ] ; then case $this_script in - *util-linux) wrt_unpack "$name-$vrs.tar.*" - echo -e '\ttrue' >> $MKFILE.tmp - ;; - *) wrt_unpack2 "$name-$vrs.tar.*" - ;; + *util-linux) wrt_unpack "$name-$vrs.tar.*" ;; + *) wrt_unpack2 "$name-$vrs.tar.*" ;; esac fi # diff --git a/HLFS/master.sh b/HLFS/master.sh index 8dd37bd..5c0ed9b 100755 --- a/HLFS/master.sh +++ b/HLFS/master.sh @@ -235,14 +235,16 @@ chapter5_Makefiles() { # Bootstrap or temptools phase case $this_script in *binutils* ) # Dump the path to sources directory for later removal - echo -e '\techo "$(MOUNT_PT)$(SRC)/$$ROOT" >> sources-dir' >> $MKFILE.tmp +( +cat << EOF + @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\ + echo "\$(MOUNT_PT)\$(SRC)/\$\$ROOT" >> sources-dir +EOF +) >> $MKFILE.tmp ;; *adjusting* ) # For the Adjusting phase we must to cd to the binutils-build directory. echo -e '\t@echo "export PKGDIR=$(MOUNT_PT)$(SRC)/binutils-build" > envars' >> $MKFILE.tmp ;; - * ) # Everything else, add a true statment so we don't confuse make - echo -e '\ttrue' >> $MKFILE.tmp - ;; esac # Insert date and disk usage at the top of the log file, the script run diff --git a/LFS/master.sh b/LFS/master.sh index 802c0d6..ee852d9 100755 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -112,7 +112,6 @@ chapter5_Makefiles() { # Insert instructions for unpacking the package and to set the PKGDIR variable. wrt_unpack "$FILE" - echo -e '\ttrue' >> $MKFILE.tmp fi # Insert date and disk usage at the top of the log file, the script run diff --git a/common/common-functions b/common/common-functions index daab9d5..df01979 100644 --- a/common/common-functions +++ b/common/common-functions @@ -225,7 +225,7 @@ cat << EOF @\$(call unpack,$FILE) @ROOT=\`head -n1 /tmp/unpacked | sed 's@^./@@;s@/.*@@'\` && \\ echo "export PKGDIR=\$(MOUNT_PT)\$(SRC)/\$\$ROOT" > envars && \\ - chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT && \\ + chown -R lfs \$(MOUNT_PT)\$(SRC)/\$\$ROOT EOF ) >> $MKFILE.tmp }