forked from melisgl/higgsml
-
Notifications
You must be signed in to change notification settings - Fork 0
/
configure
executable file
·110 lines (100 loc) · 2.21 KB
/
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
#!/bin/sh
lisp=sbcl
sbclbin=sbcl
aclbin=alisp
sbcloptions="--dynamic-space-size 24000 --noinform\
--lose-on-corruption --end-runtime-options\
--non-interactive --no-userinit --no-sysinit\
--disable-debugger"
acloptions=""
datadir=data/
modeldir=model/
submissiondir=submission/
usage()
{
cat <<EOF
Usage: $0
[--lisp [ acl | sbcl]]
[--sbcl-bin <sbcl-binary>]
[--sbcl-options <sbcl-options>]
[--acl-bin <acl-binary>]
[--acl-options <acl-options>]
[--data-dir <directory>]
[--model-dir <directory>]
[--submission-dir <directory>]
--lisp
defaults to '$lisp'.
--sbcl-bin
Path to the sbcl executable. Defaults to '$sbclbin'.
--sbcl-options
Defaults to '$sbcloptions'.
--acl-bin
Path to the AllegroCL executable. Defaults to '$aclbin'.
--acl-options
Defaults to '$acloptions'.
--data-dir
Where the uncompressed csv files reside, defaults to '$datadir'.
--model-dir
Where the model files are saved, defaults to '$modeldir'.
--submission-dir
Where submission files are saved, defaults to '$submissiondir'.
The directories can be absolute filenames or relative to the
configuration script.
EOF
}
BASE=`dirname "$0"`
cd "$BASE"
while [ "$1" != "" ]; do
case $1 in
--lisp)
shift
lisp="$1"
;;
--sbcl-bin)
shift
sbclbin="$1"
;;
--sbcl-options)
shift
sbcloptions="$1"
;;
--acl-bin)
shift
sbclbin="$1"
;;
--acl-options)
shift
acloptions="$1"
;;
--data-dir)
shift
datadir="$1"
;;
-h | --help)
usage
exit
;;
*)
usage
exit 1
esac
shift
done
if [ "$lisp" != "acl" -a "$lisp" != "sbcl" ]; then
echo "Unsupported lisp: '$lisp'"
usage
exit 1
fi
cat <<EOF > SETTINGS
LISP="$lisp"
SBCLBIN="$sbclbin"
SBCLOPTIONS="$sbcloptions"
ACLBIN="$aclbin"
ACLOPTIONS="$acloptions"
DATADIR="$datadir"
MODELDIR="$modeldir"
SUBMISSIONDIR="$submissiondir"
EOF
echo "Configuration written to SETTINGS."
echo
cat SETTINGS