diff options
author | Daniel Baumann <daniel@debian.org> | 2009-02-03 10:41:26 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 19:09:41 +0100 |
commit | 26314ad6a0ad18b256b19d93080b20cb4f98290d (patch) | |
tree | 296574adad32c980f41c6b91c450a64c3046046e /helpers | |
parent | 4d3525ab0f50c893e98170154d60503f23a34250 (diff) | |
download | vyos-live-build-26314ad6a0ad18b256b19d93080b20cb4f98290d.tar.gz vyos-live-build-26314ad6a0ad18b256b19d93080b20cb4f98290d.zip |
Adding clean parameter to lh_config to minimize config directory by automatically removing unused and thus empty subdirectories.
Diffstat (limited to 'helpers')
-rwxr-xr-x | helpers/lh_config | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/helpers/lh_config b/helpers/lh_config index c0cd61839..4b4118699 100755 --- a/helpers/lh_config +++ b/helpers/lh_config @@ -55,6 +55,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--chroot-build enabled|disabled]\n\ \t [--chroot-filesystem ext2|ext3|squashfs|plain|jffs2]\n\ \t [-c|--conffile FILE]\n\ +\t [--clean\n\ \t [--debconf-frontend dialog|editor|noninteractive|readline]\n\ \t [--debconf-nowarnings enabled|disabled]\n\ \t [--debconf-priority low|medium|high|critical]\n\ @@ -130,7 +131,7 @@ Local_arguments () apt-pipeline:,apt-recommends:,apt-secure:,bootstrap:,cache:,cache-indices:,cache-packages:, cache-stages:,debconf-frontend:,debconf-nowarnings:,debconf-priority:,dump,genisoimage:, initramfs:,fdisk:,losetup:,mode:,root-command:,use-fakeroot:,tasksel:,includes:, - templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:, + templates:,architecture:,bootstrap-config:,bootstrap-flavour:,bootstrap-keyring:,clean, distribution:,mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:, mirror-binary-security:,categories:,chroot-filesystem:,union-filesystem:,exposed-root:, hooks:,interactive:,keyring-packages:,language:,linux-flavours:,linux-packages:, @@ -194,6 +195,19 @@ Local_arguments () exit 0 ;; + clean) + # Remove empty directories in config tree + if ls config/*/ > /dev/null 2>&1 + then + rmdir --ignore-fail-on-non-empty config/*/ + fi + + if [ -d config ] + then + rmdir --ignore-fail-on-non-empty config + fi + ;; + # config/common --apt) LH_APT="${2}" |