-
Notifications
You must be signed in to change notification settings - Fork 82
/
harlani
executable file
·29 lines (25 loc) · 987 Bytes
/
harlani
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
#!/bin/bash
if [ -z $SCHEME ];
then SCHEME=petite;
fi;
if [ ! -z `which rlwrap` ];
then RLWRAP='rlwrap -c';
fi
schemeScript=./harlani.scm
HARLAN_DIR=`dirname $schemeScript`
case $SCHEME in
vicare)
$RLWRAP $SCHEME -L $HARLAN_DIR -L $HARLAN_DIR/external/nanopass-framework --more-file-extensions --r6rs-script "$schemeScript" -- -L $HARLAN_DIR/lib/harlan -R $HARLAN_DIR/rt $@
;;
petite)
dir=$HARLAN_DIR:external/nanopass-framework/lib/csv8.4/$MACHINE:$HARLAN_DIR/external/nanopass-framework
$RLWRAP petite --libdirs "$dir" --program "$schemeScript" -L $HARLAN_DIR/lib/harlan -R $HARLAN_DIR/rt $@
;;
scheme)
dir=$HARLAN_DIR:external/nanopass-framework/lib/csv8.4/$MACHINE:$HARLAN_DIR/external/nanopass-framework
scheme --compile-imported-libraries --libdirs "$dir" --program "$schemeScript" -L $HARLAN_DIR/lib/harlan -R $HARLAN_DIR/rt $@
;;
*)
echo $SCHEME is not a supported Scheme implementation
;;
esac