From 9132ffa383d8685977b5eb1d90e4f715c551e895 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sat, 13 Aug 2016 00:54:00 +0200 Subject: make_slackware_live.sh: Removing old stuff should happen at the beginning. --- make_slackware_live.sh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/make_slackware_live.sh b/make_slackware_live.sh index 99a1a10..cddb699 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -880,6 +880,14 @@ if [ ! -d ${SL_REPO} ]; then exit 1 fi +# Cleanup if we are FORCEd to rebuild from scratch: +if [ "$FORCE" = "YES" ]; then + echo "-- Removing old files and directories!" + umount ${LIVE_ROOTDIR}/{proc,sys,dev} 2>${DBGOUT} || true + umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true + rm -rf ${LIVE_STAGING}/${LIVEMAIN} ${LIVE_WORK} ${LIVE_ROOTDIR} +fi + # Create temporary directories for building the live filesystem: for LTEMP in $LIVE_OVLDIR $LIVE_BOOT $LIVE_MOD_SYS $LIVE_MOD_ADD $LIVE_MOD_OPT ; do umount ${LTEMP} 2>${DBGOUT} || true @@ -890,14 +898,6 @@ for LTEMP in $LIVE_OVLDIR $LIVE_BOOT $LIVE_MOD_SYS $LIVE_MOD_ADD $LIVE_MOD_OPT ; fi done -# Cleanup if we are FORCEd to rebuild from scratch: -if [ "$FORCE" = "YES" ]; then - echo "-- Removing old files and directories!" - umount ${LIVE_ROOTDIR}/{proc,sys,dev} 2>${DBGOUT} || true - umount ${LIVE_ROOTDIR} 2>${DBGOUT} || true - rm -rf ${LIVE_STAGING}/${LIVEMAIN} ${LIVE_WORK} ${LIVE_ROOTDIR} -fi - # Create the mount point for our Slackware filesystem: if [ ! -d ${LIVE_ROOTDIR} ]; then mkdir -p ${LIVE_ROOTDIR} -- cgit v1.2.3