tools/build.sh

16 lines
514 B
Bash

#! /usr/bin/env bash
# Args: <config-file> <arch> <builder-args> [<repo>]
if [ -z "$BUILD_DIR" ]; then
BUILD_DIR=build
fi
CONFIG_DIR="$(dirname "$0")" &&
(
if [ -z "$4" ]; then
flatpak-builder $3 --arch "$2" --rebuild-on-sdk-change "$BUILD_DIR" "$1"
else
HASH="$("$CONFIG_DIR/hash_modules.py" "$1" "$2" | sed -n '1p')" &&
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
)