flatpak/gtk3theme/flat-remix-gtk/build.sh

16 lines
467 B
Bash

#! /usr/bin/env bash
# Args: <builder args> [<repo>]
export "BASE_PATH=$(dirname "$0")" &&
mkdir -p "$BASE_PATH/scripts" &&
cat "$BASE_PATH/themes.csv" | while read i
do
cat "$BASE_PATH/base.yaml.in" | sed "s/{THEME}/$i/" > "$BASE_PATH/scripts/$i.yaml" &&
if [ -z "$2" ]
then
flatpak-builder --force-clean $1 build "$BASE_PATH/scripts/$i.yaml" || exit 1
else
flatpak-builder --force-clean --repo "$2" $1 build "$BASE_PATH/scripts/$i.yaml" || exit 1
fi
done