diff options
author | Daniel Baumann <daniel@debian.org> | 2012-07-29 23:26:15 +0200 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2012-07-29 23:26:31 +0200 |
commit | ecc1d7a0c239fa2d262e42dbbc0b0ac1893b71be (patch) | |
tree | 35b745e0df5024a4db9b0f92148b47677091825d /scripts | |
parent | 227ae768e6eb13bbd940b875b5b2a773ca88f459 (diff) | |
download | vyos-live-build-ecc1d7a0c239fa2d262e42dbbc0b0ac1893b71be.tar.gz vyos-live-build-ecc1d7a0c239fa2d262e42dbbc0b0ac1893b71be.zip |
Adding possibility to specify a git branch when using lb config --config.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/build/lb_config | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/scripts/build/lb_config b/scripts/build/lb_config index 9bc1f2a24..466f04f7c 100755 --- a/scripts/build/lb_config +++ b/scripts/build/lb_config @@ -42,7 +42,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 [--config GIT_URL::GIT_BRANCH]\n\ \t [--zsync true|false]\n\ \t [--build-with-chroot true|false]\n\ \t [--chroot-filesystem ext2|ext3|ext4|squashfs|jffs2|none]\n\ @@ -872,7 +872,16 @@ fi if [ -n "${_CONFIG}" ] then - git clone ${_CONFIG} ./ + _GIT_REPOSITORY="$(echo ${_CONFIG} | sed -e 's|::.*$||')" + + git clone ${_GIT_REPOSITORY} ./ + + if [ "${_GIT_REPOSITORY}" != "${_CONFIG}" ] + then + _GIT_BRANCH="$(echo ${_CONFIG} | awk -F\:\: '{ print $NF }')" + + git checkout ${_GIT_BRANCH} + fi fi # Read meta config |