From 29b1c3aab7ff7048562a80d1e9a7ea360337de59 Mon Sep 17 00:00:00 2001
From: Ivan Davidov <davidov.i@gmail.com>
Date: Wed, 4 May 2016 01:38:47 +0300
Subject: [PATCH] Fixed the 'src' stuff to include the README. Minor script
 formatting improvements.

---
 src/07_build_busybox.sh   | 9 ++++-----
 src/08_generate_rootfs.sh | 4 ++--
 src/11_generate_iso.sh    | 4 ++--
 3 files changed, 8 insertions(+), 9 deletions(-)

diff --git a/src/07_build_busybox.sh b/src/07_build_busybox.sh
index 3dd7c7dd1..aa481fdfb 100755
--- a/src/07_build_busybox.sh
+++ b/src/07_build_busybox.sh
@@ -34,9 +34,6 @@ else
   echo "Generating default BusyBox configuration..."  
   make defconfig
   
-  # Set the installation folder for BusyBox.
-  #sed -i "s/.*CONFIG_PREFIX.*/CONFIG_PREFIX=\"..\/busybox_installed\"/" .config  
-  
   # The 'inetd' applet fails to compile because we use the glibc installation area as
   # main pointer to the kernel headers (see 05_prepare_glibc.sh) and some headers are
   # not resolved. The easiest solution is to ignore this particular applet. 
@@ -47,7 +44,7 @@ fi
 # All back slashes are escaped (/ => \/) in order to keep the 'sed' command stable.
 GLIBC_PREPARED_ESCAPED=$(echo \"$GLIBC_PREPARED\" | sed 's/\//\\\//g')
 
-# Now we tell BusyBox to use the glibc installation area.
+# Now we tell BusyBox to use the glibc prepared area.
 sed -i "s/.*CONFIG_SYSROOT.*/CONFIG_SYSROOT=$GLIBC_PREPARED_ESCAPED/" .config
 
 # Compile busybox with optimization for "parallel jobs" = "number of processors".
@@ -58,7 +55,9 @@ make \
 
 # Create the symlinks for busybox. The file 'busybox.links' is used for this.
 echo "Generating BusyBox based initramfs area..."
-make CONFIG_PREFIX="../busybox_installed" install
+make \
+  CONFIG_PREFIX="../busybox_installed" \
+  install
 
 cd ../../..
 
diff --git a/src/08_generate_rootfs.sh b/src/08_generate_rootfs.sh
index 4e4e276be..30b14dd99 100755
--- a/src/08_generate_rootfs.sh
+++ b/src/08_generate_rootfs.sh
@@ -22,14 +22,14 @@ rm -f linuxrc
 # Copy all source files to '/src'. Note that the scripts won't work there.
 cp ../../*.sh src
 cp ../../.config src
-cp ../../*.txt src
+cp ../../README src
 cp -r ../../08_generate_rootfs src
 cp -r ../../11_generate_iso src
 
 # Make all files readable and all scripts executable.
 chmod -R +rx **/*.sh
 chmod -R +r **/.config
-chmod -R +r **/*.txt
+chmod -R +r **/README
 
 # Copy all necessary 'glibc' libraries to '/lib' BEGIN.
 
diff --git a/src/11_generate_iso.sh b/src/11_generate_iso.sh
index e3424cbb0..4366aaeb8 100755
--- a/src/11_generate_iso.sh
+++ b/src/11_generate_iso.sh
@@ -41,10 +41,10 @@ cp ../rootfs.cpio.xz ./rootfs.xz
 mkdir src
 cp ../../*.sh src
 cp ../../.config src
-cp ../../*.txt src
+cp ../../README src
 chmod +rx src/*.sh
 chmod +r src/.config
-chmod +r src/*.txt
+chmod +r src/README
 
 # Read the 'OVERLAY_TYPE' property from '.config'
 OVERLAY_TYPE="$(grep -i OVERLAY_TYPE $SRC_DIR/.config | cut -f2 -d'=')"