r3803 - jhalfs/trunk/LFS

pierre at higgs.linuxfromscratch.org pierre at higgs.linuxfromscratch.org
Fri Aug 29 09:43:10 PDT 2014


Author: pierre
Date: Fri Aug 29 09:43:10 2014
New Revision: 3803

Log:
Change the command to create the CHROOT$i variables so that it looks better.
Thanks to "amakarov" for the patch.

Modified:
   jhalfs/trunk/LFS/master.sh

Modified: jhalfs/trunk/LFS/master.sh
==============================================================================
--- jhalfs/trunk/LFS/master.sh	Wed Aug 27 02:56:45 2014	(r3802)
+++ jhalfs/trunk/LFS/master.sh	Fri Aug 29 09:43:10 2014	(r3803)
@@ -433,16 +433,12 @@
   i=1
   for file in ../chroot-scripts/*chroot* ; do
     chroot=`cat $file | \
-            sed -e "s at chroot@$CHROOT_LOC@" \
-                -e '/#!\/bin\/bash/d' \
-                -e 's@ \\\@ @g' | \
-            tr -d '\n' | \
-            sed -e 's/  */ /g' \
+            perl -pe 's|\\\\\n||g' | \
+            tr -s [:space:] | \
+            grep chroot | \
+            sed -e "s|chroot|$CHROOT_LOC|" \
                 -e 's|\\$|&&|g' \
-                -e 's|exit||g' \
-                -e 's|"$$LFS"|$(MOUNT_PT)|' \
-                -e 's|set -e||' \
-                -e 's|set +h||'`
+                -e 's|"$$LFS"|$(MOUNT_PT)|'`
     echo -e "CHROOT$i= $chroot\n" >> $MKFILE
     i=`expr $i + 1`
   done


More information about the alfs-log mailing list