diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-28 19:23:23 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-28 20:04:36 +0200 |
commit | 189ea002e45c6385f80b347de83c7cb21c88615e (patch) | |
tree | 71b0ad2e21f9710d0abf4239e1ef9405853ad3d9 | |
parent | e8a9169e26d88c49fd580977202af34aecc719b2 (diff) | |
download | vyos-live-build-189ea002e45c6385f80b347de83c7cb21c88615e.tar.gz vyos-live-build-189ea002e45c6385f80b347de83c7cb21c88615e.zip |
Reordering auto/config in lb_config to work with bootstrapping config tree from a git repository.
-rwxr-xr-x | scripts/build/lb_config | 55 |
1 files changed, 25 insertions, 30 deletions
diff --git a/scripts/build/lb_config b/scripts/build/lb_config index 7db9e3776..b3524e5ea 100755 --- a/scripts/build/lb_config +++ b/scripts/build/lb_config @@ -13,19 +13,6 @@ set -e # Including common functions ( . "${LIVE_BUILD}/scripts/build.sh" > /dev/null 2>&1 || true ) || . /usr/lib/live/build.sh -# Read meta config -if [ "${1}" != "noauto" ] && [ -x auto/config ] -then - Echo_message "Executing auto/config script." - ./auto/config "${@}" - exit ${?} -fi - -if [ "${1}" = "noauto" ] -then - shift -fi - # Setting static variables PROGRAM="lb config" DESCRIPTION="$(Echo 'create configuration for live-build(7)')" @@ -881,6 +868,31 @@ Local_arguments () done } +Local_arguments "${@}" + +if [ -e .git ] +then + _CONFIG="" +fi + +if [ -n "${_CONFIG}" ] +then + git clone ${_CONFIG} ./ +fi + +# Read meta config +if [ "${1}" != "noauto" ] && [ -x auto/config ] +then + Echo_message "Executing auto/config script." + ./auto/config "${@}" + exit ${?} +fi + +if [ "${1}" = "noauto" ] +then + shift +fi + # Reading system configuration if ! In_list "--ignore-system-defaults" "${@}" then @@ -899,23 +911,6 @@ then Read_conffiles "${_CONFFILE}" fi -if [ -n "${_CONFIG}" ] -then - # quick hack with lots of duplication, needs to be unified later on - git clone ${_CONFIG} - cd $(basename ${_CONFIG} .git) - - # Reading existing configuration - Read_conffiles config/all config/common config/bootstrap config/chroot config/binary config/source - - Local_arguments "${@}" - - if [ -n "${_CONFFILE}" ] - then - Read_conffiles "${_CONFFILE}" - fi -fi - # Setting defaults Set_defaults |