summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIru Cai <mytbk920423@gmail.com>2022-09-02 09:21:03 +0800
committerIru Cai <mytbk920423@gmail.com>2022-09-02 09:21:03 +0800
commitfe227b7d140dc6bb2ed3ffba9b1ef0eceb611ca1 (patch)
treeba82893cc15ed9419b2285de5cd07bcf547cd102
parentec66632ec6601e89f8843231d4fae397cb88b98c (diff)
downloadliveusb-builder-fe227b7d140dc6bb2ed3ffba9b1ef0eceb611ca1.tar.xz
add --bootloader-only option
-rwxr-xr-xbuildlive7
1 files changed, 6 insertions, 1 deletions
diff --git a/buildlive b/buildlive
index bc2c12e..3020410 100755
--- a/buildlive
+++ b/buildlive
@@ -17,6 +17,7 @@ DOWNLOAD_ONLY=0
UMOUNT_BOOT=0
UMOUNT_ROOT=0
CLEAN_USB=0
+BOOTLOADER_ONLY=0
. functions.sh
@@ -30,6 +31,7 @@ options:
--boot <path>
--boot=<path>: set the path to put the kernel and loader files
--clean: clean the old live USB files before installing
+ --bootloader-only: only install the boot loader
--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
@@ -85,6 +87,9 @@ do
--dev=*)
DEVNAME=${1/--dev=}
;;
+ --bootloader-only)
+ BOOTLOADER_ONLY=1
+ ;;
--no-grub)
INSTALL_GRUB=0
;;
@@ -166,7 +171,7 @@ if [[ "$DOWNLOAD_ONLY" == 0 ]]; then
msg "Files will be copy to $ROOTPATH"
fi
-if [[ "${#DISTROLIST[@]}" == 0 ]]; then
+if [[ "$BOOTLOADER_ONLY" == 0 && "${#DISTROLIST[@]}" == 0 ]]; then
usage
exit 1
fi