summaryrefslogtreecommitdiff
path: root/scripts/build/config
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2014-08-27 23:14:12 +0200
committerDaniel Baumann <mail@daniel-baumann.ch>2014-08-28 00:59:28 +0200
commitbc50443cf043616c7087f383e11bf85cd233c54e (patch)
treed7a6c03bc3207f809f4ca4ab13f079f02df28acf /scripts/build/config
parent5fc57865a4124c4432333cb73468ac2494e91d75 (diff)
downloadvyos-live-build-bc50443cf043616c7087f383e11bf85cd233c54e.tar.gz
vyos-live-build-bc50443cf043616c7087f383e11bf85cd233c54e.zip
Moving partial python rewrite to separate branch, let's do it in the jessie+1 cycle rather than go with the current mixed code.
Diffstat (limited to 'scripts/build/config')
-rwxr-xr-xscripts/build/config17
1 files changed, 15 insertions, 2 deletions
diff --git a/scripts/build/config b/scripts/build/config
index e3ae1410d..6e390e74d 100755
--- a/scripts/build/config
+++ b/scripts/build/config
@@ -883,8 +883,8 @@ Check_defaults
if [ ! -e config ]
then
- Echo_error "fatal: Not a live-build directory: use 'lb init' to initialize it"
- exit 1
+ Echo_message "Creating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LIVE_IMAGE_ARCHITECTURE} system"
+ mkdir config
else
Echo_message "Updating config tree for a ${LB_MODE}/${LB_DISTRIBUTION}/${LIVE_IMAGE_ARCHITECTURE} system"
fi
@@ -1338,6 +1338,19 @@ then
rmdir --ignore-fail-on-non-empty local > /dev/null 2>&1 || true
fi
+mkdir -p config/hooks
+mkdir -p config/includes config/includes.bootstrap config/includes.chroot config/includes.binary config/includes.source
+
+Echo_message "Symlinking hooks..."
+
+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}