From abc8b27cb4bffe0da372aa898034195a3d436796 Mon Sep 17 00:00:00 2001 From: Pierre Labastie Date: Fri, 29 Aug 2014 16:43:10 +0000 Subject: [PATCH] Change the command to create the CHROOT$i variables so that it looks better. Thanks to "amakarov" for the patch. --- LFS/master.sh | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/LFS/master.sh b/LFS/master.sh index 24b5a32..e89c08a 100644 --- a/LFS/master.sh +++ b/LFS/master.sh @@ -433,16 +433,12 @@ build_Makefile() { # i=1 for file in ../chroot-scripts/*chroot* ; do chroot=`cat $file | \ - sed -e "s@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