-
-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathtools
executable file
·41 lines (39 loc) · 1.56 KB
/
tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#!/bin/sh
PROJECT_NAME="com.github.davidmhewitt.torrential"
MODULE_NAME="torrential"
case $1 in
clean)
rm -rf .flatpak-builder/
rm -rf build/
;;
pot)
TMPDIR=$(basename `mktemp -u`)
mkdir "$TMPDIR"
flatpak-builder build "$PROJECT_NAME.yml" --force-clean --stop-at="$MODULE_NAME" --state-dir="$TMPDIR"
echo "ninja extra-pot; ninja $PROJECT_NAME-pot" | flatpak-builder build "$PROJECT_NAME.yml" --force-clean --build-shell="$MODULE_NAME" --state-dir="$TMPDIR"
cp "$TMPDIR/build/$MODULE_NAME/po/extra/extra.pot" po/extra/
cp "$TMPDIR/build/$MODULE_NAME/po/$PROJECT_NAME.pot" po/
rm -rf "$TMPDIR"
;;
po)
TMPDIR=$(basename `mktemp -u`)
mkdir "$TMPDIR"
flatpak-builder build "$PROJECT_NAME.yml" --force-clean --stop-at="$MODULE_NAME" --state-dir="$TMPDIR"
echo "ninja extra-update-po; ninja $PROJECT_NAME-update-po" | flatpak-builder build "$PROJECT_NAME.yml" --force-clean --build-shell="$MODULE_NAME" --state-dir="$TMPDIR"
cp "$TMPDIR/build/$MODULE_NAME/po/extra/"*.po po/extra/
cp "$TMPDIR/build/$MODULE_NAME/po/"*.po po/
rm -rf "$TMPDIR"
;;
shell)
TMPDIR=$(basename `mktemp -u`)
mkdir "$TMPDIR"
flatpak-builder build "$PROJECT_NAME.yml" --force-clean --build-shell="$MODULE_NAME" --state-dir="$TMPDIR"
rm -rf "$TMPDIR"
;;
build)
flatpak-builder --install --force-clean --user build $PROJECT_NAME.yml
;;
run)
flatpak run --user $PROJECT_NAME
;;
esac