summaryrefslogtreecommitdiffstats
path: root/maintenance/deb-install.sh
blob: 58ffed80bbadc7b9462fc845b2fa0a8de38de3a6 (plain)
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
#!/bin/sh


die()
{
	echo "$*" >&2
	exit 1
}

install()
{
	for i in "$@"; do
		if printf '%s' "$i" | grep -qe dbgsym; then
			continue
		fi
		if ! [ -f "$i" ]; then
			echo "Warning: $i does not exist. Skipping..."
			continue
		fi
		echo "Installing $i ..."
		dpkg -i "$i" || die "FAILED: dpkg -i $i"
	done
}

basedir="$1"
[ -d "$basedir" ] || die "Usage:  deb-install.sh PACKAGEDIR"

for interp in python3 cython3 pypy; do
	install "$basedir"/$interp-awlsim_*_*.deb
	install "$basedir"/$interp-awlsimhw-*_*_*.deb
	if [ "$interp" = "python3" ]; then
		install "$basedir"/$interp-awlsim-gui_*_*.deb
	fi
done
install "$basedir"/awlsim-*_*_*.deb

exit 0
bues.ch cgit interface