tools/build.sh

14 lines
508 B
Bash
Raw Normal View History

2020-01-11 16:51:04 +00:00
#! /usr/bin/env bash
# Args: <config-file> <arch> <builder-args> [<repo>]
if [ -z "$BUILD_DIR" ]; then
BUILD_DIR=build
fi
CONFIG_DIR="$(dirname "$0")" &&
2020-01-11 20:51:01 +00:00
if [ -z "$4" ]; then
exec flatpak-builder $3 --arch "$2" --rebuild-on-sdk-change "$BUILD_DIR" "$1"
else
2020-01-20 10:40:26 +00:00
HASH="$("$CONFIG_DIR/hash_modules.py" --installed "$1" "$2" | sed -n '1p')" &&
2020-01-11 20:51:01 +00:00
exec flatpak-builder $3 --arch "$2" --rebuild-on-sdk-change --gpg-sign=winebarrels@marko10-000.de --repo "$4" -s "WB_HASH='${HASH}'" "$BUILD_DIR" "$1"
fi