-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·49 lines (37 loc) · 891 Bytes
/
configure
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
#! /bin/zsh
#
# shellcheck disable=SC2296,SC1090,SC1091
#
PROGNAME="$(basename "$0")"
usage() {
printf "Usage: %s [-r] [-u]" "$PROGNAME" >&2
print " -r refresh contents, dont mess with .ORIG files" >&2
print " -u uninstall" >&2
exit 1
}
INSTALLOP=install
DESTDIR=$HOME
DEBUG=false
while getopts "Drud:" o; do
case "${o}" in
u) INSTALLOP=uninstall ;;
d) DESTDIR=$OPTARG ;;
D) DEBUG=true ;;
*) usage ;;
esac
done
shift $((OPTIND-1))
$DEBUG && INSTALLOP='log'
export INSTALLOP
HERE="$(cd "$(dirname "$0")" && pwd)"
export DESTDIR HERE
. ./scripts/utilities
flist_init
. ./common/configure
. ./"$(uname -s)"/configure
. ./"$(uname -s)"/software-install
#
# Protect the repo
#
pre-commit install --install-hooks
flist_done