From 7d62e5f636d29dee2d5e71246fa3d5fbbc07f230 Mon Sep 17 00:00:00 2001 From: torben Date: Sat, 6 Feb 2016 13:29:02 +0100 Subject: Adding feature to update with standaloine script. --- builder/build-initramfs.sh | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'builder/build-initramfs.sh') diff --git a/builder/build-initramfs.sh b/builder/build-initramfs.sh index 8a6497f6..49698bff 100755 --- a/builder/build-initramfs.sh +++ b/builder/build-initramfs.sh @@ -67,6 +67,7 @@ debug='no' target='' create_system_image='' cleanup='no' +full_cleanup='no' use_systemd_in_initramfs='no' declare -A core_dependencies=( [cpio]='pack initramfs' \ @@ -125,6 +126,8 @@ print_command_line_option_description() { -c --cleanup Removes all distribution specific compiled files. +-f --full-cleanup Removes all retrieved and compiled files (usefull to retrieve latest version of all nested modules). + -i --create-system-image Creates an image under given path from current system. (default: "$create_system_image"). @@ -183,6 +186,10 @@ parse_command_line() { shift cleanup='yes' ;; + -f|--full-cleanup) + shift + full_cleanup='yes' + ;; -s|--use-systemd-in-initramfs) shift use_systemd_in_initramfs='yes' @@ -448,6 +455,10 @@ fi if [[ "$create_system_image" != '' ]]; then logging.info 'Create system image.' create_qcow2_system "$create_system_image" +elif [[ "$full_cleanup" == 'yes' ]]; then + logging.info 'Removing all modules.' + rm "$(dirname "${BASH_SOURCE[0]}")/dnbd3-rootfs" \ + "$(dirname "${BASH_SOURCE[0]}")/dracut" --recursive --force elif [[ "$cleanup" == 'yes' ]]; then logging.info 'Removing distribution specific files.' cleanup -- cgit v1.2.3-55-g7522