From 1bcc4494831e3b55b6f8f83f2a2fa4de2b77fc9d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 3 Nov 2013 21:07:22 +0100 Subject: Automatically symlink hooks upon creation of the configuration tree. --- scripts/build/config | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/config b/scripts/build/config index 5a8203fd8..5f8012edb 100755 --- a/scripts/build/config +++ b/scripts/build/config @@ -61,7 +61,6 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\ \t [--force]\n\ \t [--grub-splash FILE]\n\ \t [--gzip-options OPTION|\"OPTIONS\"]\n\ -\t [--hooks FILE]\n\ \t [--ignore-system-defaults]\n\ \t [--initramfs auto|none|live-boot|casper]\n\ \t [--initramfs-compression bzip2|gzip|lzma]\n\ @@ -138,7 +137,7 @@ Local_arguments () mirror-bootstrap:,mirror-chroot:,mirror-chroot-security:,mirror-binary:, mirror-binary-security:,mirror-debian-installer:, archive-areas:,parent-archive-areas:,chroot-filesystem:, - gzip-options:,hooks:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:, + gzip-options:,image-name:,interactive:,keyring-packages:,linux-flavours:,linux-packages:, security:,updates:,backports:,binary-filesystem:,binary-images:, apt-indices:,bootappend-install:,bootappend-live:,bootappend-live-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:, debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:, @@ -443,11 +442,6 @@ Local_arguments () shift 2 ;; - --hooks) - LB_HOOKS="${2}" - shift 2 - ;; - --image-name) LIVE_IMAGE_NAME="${2}" shift 2 @@ -1127,10 +1121,6 @@ LB_CHROOT_FILESYSTEM="${LB_CHROOT_FILESYSTEM}" # (Default: ${LB_UNION_FILESYSTEM}) LB_UNION_FILESYSTEM="${LB_UNION_FILESYSTEM}" -# \$LB_HOOKS: set hook commands -# (Default: empty) -LB_HOOKS="${LB_HOOKS}" - # \$LB_INTERACTIVE: set interactive build # (Default: ${LB_INTERACTIVE}) LB_INTERACTIVE="${LB_INTERACTIVE}" @@ -1367,6 +1357,14 @@ then Echo_warning "Make sure you are using the newest version at all times." fi +for _HOOK in "${LIVE_BUILD}"/share/hooks/*.hook* /usr/share/live/build/hooks/*.hook* +do + if [ -e "${_HOOK}" ] && [ ! -e "config/hooks/$(basename ${_HOOK})" ] + then + ln -s "${_HOOK}" "config/hooks/$(basename ${_HOOK})" + fi +done + cat > config/build << EOF [Image] Architecture: ${LIVE_IMAGE_ARCHITECTURE} -- cgit v1.2.3