-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathconfigure
executable file
·44 lines (41 loc) · 926 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
#! /bin/sh
#
# Wrapper script around "yorick -batch config.i"
dir=`dirname "$0"`
config_i="$dir/config.i"
if test ! -f "$config_i" -o ! -r "$config_i"; then
echo >&2 "File \"config.i\" not found."
echo >&2 "Maybe Yeti distribution not properly unpacked."
exit 1
fi
yorick=
n=1
while test $n -le $#; do
eval arg=\$$n
case "$arg" in
--yorick=*)
yorick=`echo "$arg" | sed 's/^--yorick=//'`
;;
esac
n=`expr $n + 1`
done
# Search Yorick in the path:
if test "x$yorick" = "x"; then
exe_sfx=
save_IFS=$IFS
IFS=":"
for dir in $PATH; do
file=$dir/yorick$exe_sfx
if test -f "$file" -a -x "$file"; then
yorick=$file
break
fi
done
IFS=$save_IFS
fi
if test "x$yorick" = "x" -o ! -f "$yorick" -o ! -x "$yorick"; then
echo >&2 "Yorick excutable not found."
echo >&2 "Try to specify the path with option --yorick=..."
exit 1
fi
exec "$yorick" -batch "$config_i" "$@"