summaryrefslogtreecommitdiff
path: root/scripts/install
blob: 174d27d5afdcf000039a03da97371bd61f005a6a (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
#!/usr/bin/env bash
# This file is part of the OpenADK project. OpenADK is copyrighted
# material, please see the LICENCE file in the top-level directory.

# eliminate unwanted install flags:
# -o and -g require root as caller which we don't want
# -s is unwanted as we strip ourselfs if debugging is turned off
declare -a opts
while [[ "$1" ]]; do
	case "$1" in
	-o|--owner) shift ;;
	-g|--group) shift ;;
	-s|--strip) ;;
	*) opts+=("$1") ;;
	esac
	shift
done

# prefer ginstall if available
if [ -z "$(which ginstall 2>/dev/null)" ];then
	install=/usr/bin/install
else
	install=ginstall
fi

# do the actual call
exec $install "${opts[@]}"