-
Notifications
You must be signed in to change notification settings - Fork 19
/
mkmk
executable file
·60 lines (50 loc) · 1.03 KB
/
mkmk
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
#!/bin/bash
if test -z "$prefix"
then
echo "The environment variable \"prefix\" has not been set to a usable value!" >&2
exit 2
fi
which getdap
if test $? -ne 0
then
echo "Unable to locate the getdap application." >&2
exit 2
fi
which getdap4
if test $? -ne 0
then
echo "Unable to locate the getdap4 application." >&2
exit 2
fi
# Define options string
OPTSTRING="hvda" # --enable-developer, --enable-asan
# Initialize variables
developer=
asan=
verbose=false
# Process options using getopts
while getopts "$OPTSTRING" opt; do
case $opt in
h)
echo "Usage: $0 [-h] [-d] [-a] [-v]"
exit 0
;;
v)
verbose=true
;;
d)
developer="--enable-developer"
;;
a)
asan="--enable-asan"
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
esac
done
if [[ verbose ]]; then
echo "./configure --prefix=$prefix --with-dependencies=$prefix/deps $developer $asan"
fi
./configure --prefix=$prefix --with-dependencies=$prefix/deps $developer $asan