#!/bin/bash # (c) 2014-2018 Freifunk Hochstift # # calls build.sh with information found in given versionfile ### includes . functions.sh ### static variables MY_DIR=$(dirname $0) MY_DIR=$(readlink -f "${MY_DIR}") ### set reasonable defaults for unset environment variables versionfile=$1 [ -r ${versionfile} ] || abort "Failed to find versionfile: '${versionfile}'." . ${versionfile} [ -n "${BROKEN}" ] || BROKEN=0 [ -n "${BRANCH}" ] || abort "Failed to parse branch name from version file." [ -n "${GLUON}" ] || abort "Failed to parse Gluon base commit-id from version file." [ -n "${SITE}" ] || abort "Failed to parse site repo commit-id from version file." [ -n "${TARGETS}" ] || abort "Failed to parse targets from version file" [ -n "${TS}" ] || abort "Failed to parse timestamp from version file." [ -n "${VERSION}" ] || abort "Failed to parse version from version file." info "Building ${BRANCH} version '${VERSION}' again ..." echo " * Gluon base: ${GLUON}" echo " * Site commit: ${SITE}" echo " * Targets: ${TARGETS}" echo " * Timestamp: ${TS}" # invoke build script pushd ${MY_DIR} > /dev/null BASE="${GLUON}" BRANCH="${BRANCH}" SITE="${SITE}" VERSION="${VERSION}" BUILD_TS="${TS}" TARGETS="${TARGETS}" BROKEN="${BROKEN}" ./build.sh popd > /dev/null #${MY_DIR}