-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathoptions.sh
41 lines (37 loc) · 812 Bytes
/
options.sh
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
#!/bin/bash
# GatherPHP
#
# Don't touch this file here - it would prevent you to just "git pull"
# your GatherPHP installation.
#
# Author: Pascal Mathis <[email protected]>
VERSION=$1
VMAJOR=$2
VMINOR=$3
VPATCH=$4
FLAGS=$5
last="options.sh"
config_timestamp=`stat -c '%Y' options.sh`
config_options=" \
--disable-all \
"
for suffix in \
"" \
"-$VMAJOR" \
"-$VMAJOR.$VMINOR" \
"-$VMAJOR.$VMINOR.$VPATCH" \
"-$VMAJOR$FLAGS" \
"-$VMAJOR.$VMINOR$FLAGS" \
"-$VMAJOR.$VMINOR.$VPATCH$FLAGS" \
; do
custom="custom/options$suffix.sh"
if [ -e "$custom" ]; then
tstamp=`stat -c '%Y' "$custom"`
if [ $tstamp -gt $config_timestamp ]; then
config_timestamp=$tstamp
fi
last=$custom
source "$custom" "$VERSION" "$VMAJOR" "$VMINOR" "$VPATCH"
fi
done
echo "Used configuration for $VERSION: $last"