File: create_git_snapshot.sh

package info (click to toggle)
grisbi 3.90.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 31,152 kB
  • sloc: ansic: 133,072; makefile: 1,092; sh: 1,007; xml: 642; python: 124; perl: 82
file content (64 lines) | stat: -rwxr-xr-x 1,156 bytes parent folder | download
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash

# fail on first error
set -e

# fail on undefined variable
set -u

# debug
set -x

if [ -z "$JHBUILD_LIBDIR" ]
then
	echo "Use: jhbuild shell"
	exit
fi

BUILD_DIR="snapshot"
rm -rf "$BUILD_DIR"

meson setup "$BUILD_DIR" --prefix="$PREFIX" "$@"

meson compile -C "$BUILD_DIR"
meson install -C "$BUILD_DIR"

rm -f MacOS/Grisbi-*.dmg
rm -rf MacOS/dist

# CPU architecture
ARCH=$(uname -m)

# extract version from config.h
GRISBI_VERSION=$(grep VERSION $BUILD_DIR/config.h | cut -f 3 -d ' ' | tr -d '"')

sed -e "s/VERSION/$GRISBI_VERSION/" MacOS/Info.plist.in > MacOS/Info.plist

GRIBSI_BUNDLE_PATH=. gtk-mac-bundler MacOS/Grisbi.bundle

./MacOS/manual_add.sh

CUSTOM_ARGS=""
if [ "$(uname -m)" = "arm64" ]
then
    echo "On ARM CPU"
    CUSTOM_ARGS+="--add-file CtrlClickOpenMe.command CtrlClickOpenMe.command 325 100"
fi

(
cd MacOS
touch .this-is-the-create-dmg-repo
./create-dmg \
	--volname Grisbi \
	--volicon Grisbi.icns \
	--window-size 640 400 \
	--background background.png \
	--icon-size 96 \
	--app-drop-link 500 250 \
	--icon "Grisbi.app" 150 250 \
	$CUSTOM_ARGS \
	Grisbi-"$GRISBI_VERSION"-"$ARCH".dmg \
	dist
)

rm -r "$BUILD_DIR"