import build.sh from master

This commit is contained in:
genofire 2022-07-23 15:42:58 +02:00
parent dfd2c4b43c
commit 39f2f9436b
1 changed files with 9 additions and 9 deletions

View File

@ -3,31 +3,31 @@
# environmental and build settings # environmental and build settings
KEYFILE="${KEYFILE:-"$HOME/.ecdsakey"}" KEYFILE="${KEYFILE:-"$HOME/.ecdsakey"}"
GLUON_PRIORITY="${GLUON_PRIORITY:-7}" GLUON_PRIORITY="${GLUON_PRIORITY:-7}"
JOBS=${JOBS:-"$(grep -c '^processor' /proc/cpuinfo)"}
# start of script # start of script
set -eu set -eu
# determine absolute path of site repository # determine absolute path of site repository
if which realpath > /dev/null; then if which realpath > /dev/null; then
export GLUON_SITEDIR="$(dirname "$(realpath "$0")")" GLUON_SITEDIR="$(dirname "$(realpath "$0")")"
else else
export GLUON_SITEDIR="$(dirname "$(readlink -f "$0")")" GLUON_SITEDIR="$(dirname "$(readlink -f "$0")")"
fi fi
export GLUON_SITEDIR
GLUON_DIR="${GLUON_SITEDIR}/gluon/" GLUON_DIR="${GLUON_SITEDIR}/gluon/"
# start building # start building
cd "${GLUON_DIR}" cd "${GLUON_DIR}"
make update V=s make update V=s
if [ -z "${GLUON_TARGETS:-}" ]; then GLUON_TARGETS=${GLUON_TARGETS:-"$(make list-targets)"}
GLUON_TARGETS="$(make list-targets)"
fi
for target in $GLUON_TARGETS; do for target in $GLUON_TARGETS; do
echo "Building target ${target}" echo "Building target ${target}"
schedtool -B -e \ schedtool -B -e \
make --jobs=$(grep -c '^processor' /proc/cpuinfo) GLUON_TARGET="$target" || \ make --jobs="$JOBS" --output-sync=recurse \
make -j1 --output-sync=recurse GLUON_TARGET="$target" V=sc GLUON_TARGET="$target" V=s
done done
# generate manifests # generate manifests
@ -43,7 +43,7 @@ if [ -z "${GLUON_AUTOUPDATER_BRANCH:-}" ]; then
fi fi
# sign testing/nightly manifest if key is present # sign testing/nightly manifest if key is present
if [ -n "$KEYFILE" -a -r "$KEYFILE" ]; then if [ -n "$KEYFILE" ] && [ -r "$KEYFILE" ]; then
"${GLUON_DIR}/contrib/sign.sh" "$KEYFILE" \ "${GLUON_DIR}/contrib/sign.sh" "$KEYFILE" \
"${GLUON_DIR}/output/images/sysupgrade/manifest" "${GLUON_DIR}/output/images/sysupgrade/testing.manifest"
fi fi