diff options
Diffstat (limited to 'buildlive')
-rwxr-xr-x | buildlive | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -16,6 +16,7 @@ GRUBCFG_ONLY=0 DOWNLOAD_ONLY=0 UMOUNT_BOOT=0 UMOUNT_ROOT=0 +CLEAN_USB=0 . functions.sh @@ -37,6 +38,7 @@ options: --root=<path>: set the path to put the live USB data files --boot <path> --boot=<path>: set the path to put the kernel and loader files + --clean: clean the old live USB files before installing --no-grub: do not install GRUB loader (still generate grub.cfg) --grubcfg: do not do real install, only generate grub.cfg file --downloadonly: only download the ISO files @@ -98,6 +100,9 @@ do --downloadonly) DOWNLOAD_ONLY=1 ;; + --clean) + CLEAN_USB=1 + ;; *=*|-*) usage exit 1 @@ -162,6 +167,11 @@ if [ ! -z "$DEVNAME" ]; then msg "Boot sector will be written to $DEVNAME" fi +if [[ "$CLEAN_USB" = 1 ]]; then + msg "Cleaning old live USB files." + rm -rf "$KERNELDIR"/* "$DATADIR"/* +fi + for i in ${DISTROLIST[@]} do process_isoinfo "$i" |