File: update-bindings.sh

package info (click to toggle)
papers 48.5-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 23,092 kB
  • sloc: ansic: 38,470; sh: 195; xml: 127; makefile: 117
file content (33 lines) | stat: -rwxr-xr-x 602 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

if [ -n "${DEB_SOURCE_DIR}" ]; then
	pushd "${DEB_SOURCE_DIR}/rust"
fi

export PATH="$PATH:${MESON_SOURCE_ROOT}/rust/gir/target/release"

if ! command -v gir &> /dev/null
then
	echo "command gir could not be found in PATH"
	exit 1
fi

# Only re-generate bindings once to avoid useless rebuilds
if ! [ -f "ev-girs/$(basename $1)" ]; then
	for g in ${@:1}; do
		cp "$g" pps-girs
	done

	for d in papers-document papers-view; do
		pushd $d > /dev/null
		pushd sys > /dev/null
		gir -o .
		popd &> /dev/null
		gir -o .
		popd > /dev/null
	done
fi

if [ -n "${DEB_SOURCE_DIR}" ]; then
	popd
fi