diff --git a/src/04_build_glibc.sh b/src/04_build_glibc.sh index a316f8b88..e022474f5 100755 --- a/src/04_build_glibc.sh +++ b/src/04_build_glibc.sh @@ -18,8 +18,7 @@ rm -rf $GLIBC_INSTALLED mkdir $GLIBC_INSTALLED # Find the glibc source directory, e.g. 'glibc-2.23' and remember it. -cd $WORK_DIR/glibc -GLIBC_SRC=$PWD/`ls -d glibc-*` +GLIBC_SRC=`ls -d $WORK_DIR/glibc/glibc-*` # All glibc work is done from the working area. cd $GLIBC_OBJECTS diff --git a/src/08_prepare_bundles.sh b/src/08_prepare_bundles.sh index 253cd4186..f1ef4d6fa 100755 --- a/src/08_prepare_bundles.sh +++ b/src/08_prepare_bundles.sh @@ -8,7 +8,7 @@ set -e echo "*** PREPARE OVERLAY BEGIN ***" echo "Preparing overlay work area." -rm -rf $SRC_DIR/work/overlay* +rm -rf $WORK_DIR/overlay* # Read the 'OVERLAY_BUNDLES' property from '.config' OVERLAY_BUNDLES=`read_property OVERLAY_BUNDLES` diff --git a/src/11_generate_overlay.sh b/src/11_generate_overlay.sh index 15281e8b5..9d6a3475d 100755 --- a/src/11_generate_overlay.sh +++ b/src/11_generate_overlay.sh @@ -7,9 +7,11 @@ set -e echo "*** GENERATE OVERLAY BEGIN ***" -# Remove the old ISO generation area if it exists. +# Remove the old ISO image overlay area. echo "Removing old overlay area. This may take a while." rm -rf $ISOIMAGE_OVERLAY + +# Create the new ISO image overlay area. mkdir -p $ISOIMAGE_OVERLAY cd $ISOIMAGE_OVERLAY @@ -62,7 +64,10 @@ if [ "$OVERLAY_LOCATION" = "iso" \ $ISOIMAGE_OVERLAY/sparse/rootfs # Unmount the sparse file and delete the temporary folder. + sync $BUSYBOX umount $ISOIMAGE_OVERLAY/sparse + sync + sleep 1 rm -rf $ISOIMAGE_OVERLAY/sparse # Detach the loop device since we no longer need it. diff --git a/src/13_prepare_iso.sh b/src/13_prepare_iso.sh index 166c641a6..ad8efef1a 100755 --- a/src/13_prepare_iso.sh +++ b/src/13_prepare_iso.sh @@ -8,8 +8,7 @@ set -e echo "*** PREPARE ISO BEGIN ***" # Find the Syslinux build directory. -cd `ls -d $WORK_DIR/syslinux/*` -WORK_SYSLINUX_DIR=$PWD +WORK_SYSLINUX_DIR=`ls -d $WORK_DIR/syslinux/syslinux-*` # Remove the old ISO generation area if it exists. echo "Removing old ISO image work area. This may take a while."