summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2012-07-28 19:17:53 +0200
committerDaniel Baumann <daniel@debian.org>2012-07-28 19:17:53 +0200
commite8a9169e26d88c49fd580977202af34aecc719b2 (patch)
tree2cb5e12a70b0c5f54cdd9c5ceed04c1d90d6918c /scripts
parent0ba1c532f829686b6a878115ce166c196ed29ae7 (diff)
downloadvyos-live-build-e8a9169e26d88c49fd580977202af34aecc719b2.tar.gz
vyos-live-build-e8a9169e26d88c49fd580977202af34aecc719b2.zip
Allowing to specify a git repository to lb_config in order to bootstrap a config tree.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/build/lb_config25
1 files changed, 24 insertions, 1 deletions
diff --git a/scripts/build/lb_config b/scripts/build/lb_config
index 8a23f9705..7db9e3776 100755
--- a/scripts/build/lb_config
+++ b/scripts/build/lb_config
@@ -55,6 +55,7 @@ USAGE="${PROGRAM} [--apt apt|aptitude]\n\
\t [--cache-stages STAGE|\"STAGES\"]\n\
\t [--checksums md5|sha1|sha256|none]\n\
\t [--compression bzip2|gzip|lzip|xz|none]\n\
+\t [--config GIT_URL]\n\
\t [--zsync true|false]\n\
\t [--build-with-chroot true|false]\n\
\t [--chroot-filesystem ext2|ext3|ext4|squashfs|jffs2|none]\n\
@@ -167,7 +168,7 @@ Local_arguments ()
archives:,archive-areas:,parent-archive-areas:,chroot-filesystem:,exposed-root:,
gzip-options:,hooks:,interactive:,keyring-packages:,linux-flavours:,linux-packages:,
package-lists:,security:,volatile:,backports:,binary-filesystem:,binary-images:,
- apt-indices:,bootappend-install:,bootappend-live:,bootappend-failsafe:,bootloader:,checksums:,compression:,zsync:,build-with-chroot:,
+ apt-indices:,bootappend-install:,bootappend-live:,bootappend-failsafe:,bootloader:,checksums:,compression:,config:,zsync:,build-with-chroot:,
debian-installer:,debian-installer-distribution:,debian-installer-preseedfile:,debian-installer-gui:,
grub-splash:,isohybrid-options:,hdd-label:,hdd-size:,iso-application:,iso-preparer:,iso-publisher:,
iso-volume:,jffs2-eraseblock:,memtest:,net-root-filesystem:,net-root-mountoptions:,
@@ -621,6 +622,11 @@ Local_arguments ()
shift 2
;;
+ --config)
+ _CONFIG="${2}"
+ shift 2
+ ;;
+
--zsync)
LB_ZSYNC="${2}"
shift 2
@@ -893,6 +899,23 @@ 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