1234567891011121314151617181920212223242526272829 |
- #!/bin/bash
- # calls build.sh with information found in given version
- MY_DIR=$(dirname $0)
- MY_DIR=$(readlink -f "$MY_DIR")
- pushd $MY_DIR > /dev/null
- . functions.sh
- version=$1
- versionfile="${MY_DIR}/versions/${version}"
- [ -r $versionfile ] || abort "Failed to find the version '$version'."
- base=`awk 'BEGIN { FS="=" } /^gluon=([a-f0-9]+)$/ { print $2; }' $versionfile`
- branch=`awk 'BEGIN { FS="=" } /^branch=([a-z]+)$/ { print $2; }' $versionfile`
- site=`awk 'BEGIN { FS="=" } /^site=([a-f0-9]+)$/ { print $2; }' $versionfile`
- [ -z "$base" ] && abort "Failed to parse Gluon base commit-id from version file."
- [ -z "$branch" ] && abort "Failed to parse branch name from version file."
- [ -z "$site" ] && abort "Failed to parse site repo commit-id from version file."
- info Building $branch version '$version' again ...
- echo " * Gluon base = $base"
- echo " * Site repo = $site"
- echo
- # invoke build script
- BASE=$base BRANCH=$branch SITE=$site VERSION=$version ./build.sh
|