summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-30 00:33:33 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-30 00:33:33 +0200
commitda30397e4b4676c231f2f40787f3dbec7de27dcb (patch)
tree22dee368f771f03c15d65a80ac63194c6453c602 /scripts
parente2b2441d86b06f7bec5235053d4656a7cc459a26 (diff)
downloadvyos-live-build-da30397e4b4676c231f2f40787f3dbec7de27dcb.tar.gz
vyos-live-build-da30397e4b4676c231f2f40787f3dbec7de27dcb.zip
Automatically update auto/config when using --config with extra options.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_config8
1 files changed, 8 insertions, 0 deletions
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index 23d44a9e5..325c8836b 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -884,6 +884,14 @@ then
Echo_message "Checking out ${_GIT_BRANCH}"
git checkout ${_GIT_BRANCH}
fi
+
+ if [ -e auto/config ]
+ then
+ _EXTRA_OPTIONS="$(echo ${@} | sed -e "s|--config ${_GIT_REPOSITORY}::${_GIT_BRANCH}||g" -e "s|--config ${_GIT_REPOSITORY}||g")"
+
+ Echo_message "The following extra options specified to lb config are going to be added to auto/config: ${_EXTRA_OPTIONS}"
+ sed -i -e "s|\"\${@}\"|${_EXTRA_OPTIONS} \"\${@}\"|" auto/config
+ fi
fi
# Read meta config