diff options
author | Chris Lamb <chris@chris-lamb.co.uk> | 2008-06-20 01:35:07 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:03:36 +0100 |
commit | 468838fdad1c4496c2260131c01785f701b0e7cb (patch) | |
tree | 411461bc348b383b1087f0ee1260456a00b7d446 | |
parent | 1271828d6d5459403a44a58bc56f12c3c6b9c388 (diff) | |
download | vyos-live-build-468838fdad1c4496c2260131c01785f701b0e7cb.tar.gz vyos-live-build-468838fdad1c4496c2260131c01785f701b0e7cb.zip |
Refactor destination setting in lh_binary_silo to check arguments at beginning of the script.
-rwxr-xr-x | helpers/lh_binary_silo | 37 |
1 files changed, 15 insertions, 22 deletions
diff --git a/helpers/lh_binary_silo b/helpers/lh_binary_silo index 0c0531a5f..42d57fd7e 100755 --- a/helpers/lh_binary_silo +++ b/helpers/lh_binary_silo @@ -33,6 +33,17 @@ then exit 0 fi +# Check image type +case "${LH_BINARY_IMAGES}" in + iso|usb-hdd) + ;; + + net|tar) + Echo_error "not yet supported, aborting (FIXME)." + exit 1 + ;; +esac + Echo_message "Begin installing silo..." # Requiring stage file @@ -98,38 +109,20 @@ Silo_install_entry () LINUX_INSTALL="${LINUX_INSTALL}\t append=\"LH_BOOTAPPEND_LIVE ${APPEND} LH_BOOTAPPEND_INSTALL\"\n" } +# Setting destination directories +DESTDIR_INSTALL="binary/install" case "${LH_INITRAMFS}" in casper) INITFS="casper" + DESTDIR_LIVE="binary/casper" ;; live-initramfs) INITFS="live" + DESTDIR_LIVE="binary/live" ;; esac -# Setting destination directory -case "${LH_BINARY_IMAGES}" in - iso|usb-hdd) - case "${LH_INITRAMFS}" in - casper) - DESTDIR_LIVE="binary/casper" - ;; - - live-initramfs) - DESTDIR_LIVE="binary/live" - ;; - esac - - DESTDIR_INSTALL="binary/install" - ;; - - net|tar) - Echo_error "not yet supported, aborting (FIXME)." - exit 1 - ;; -esac - # Creating directory mkdir -p "${DESTDIR_LIVE}" |