summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2013-11-03 20:05:54 +0100
committerDaniel Baumann <mail@daniel-baumann.ch>2013-11-03 20:51:12 +0100
commitf03f05097e49d55cf2314b6a48145bf898e3233c (patch)
treeef2d7702a9a8312cb824b2a6513efe3e8f09b50b
parentc9cd3af6ec0ffe74be256ac0f1982367b5147129 (diff)
downloadvyos-live-build-f03f05097e49d55cf2314b6a48145bf898e3233c.tar.gz
vyos-live-build-f03f05097e49d55cf2314b6a48145bf898e3233c.zip
Also processing config/hooks/*.hook in bootstrap_hooks, if any.
-rwxr-xr-xscripts/build/bootstrap_hooks8
1 files changed, 5 insertions, 3 deletions
diff --git a/scripts/build/bootstrap_hooks b/scripts/build/bootstrap_hooks
index b8d144020..2d6887d58 100755
--- a/scripts/build/bootstrap_hooks
+++ b/scripts/build/bootstrap_hooks
@@ -60,9 +60,9 @@ def main():
sys.exit(1)
# hooks
- if not glob.glob('config/hooks/*.hook.bootstrap'):
+ if not glob.glob('config/hooks/*.hook') and not glob.glob('config/hooks/*.hook.bootstrap'):
if verbose:
- print ('I: no bootstrap hooks found at config/hooks/*.hook.bootstrap - nothing to do')
+ print ('I: no bootstrap hooks found at config/hooks/*.hook{,.bootstrap} - nothing to do')
sys.exit(0)
@@ -78,7 +78,9 @@ def main():
# process hooks
os.makedirs('chroot/live-build', exist_ok=True)
- for hook in glob.glob('config/hooks/*.hook.bootstrap'):
+ hooks = glob.glob('config/hooks/*.hook') + glob.glob('config/hooks/*.hook.bootstrap')
+
+ for hook in hooks:
if verbose:
print('I: Copying config/hooks/*.hook.bootstrap to chroot/live-build')