-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathpackage.sh
43 lines (34 loc) · 947 Bytes
/
package.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
42
#!/bin/sh
if test z$1 = z; then
echo "USAGE: package.sh <platform> <pkgdir>"
echo "This should only be used by invoking \"make package\", and then"
echo "only on Windows or other non-UNIX platforms."
fi
OS=`uname -s | sed -e 's:[_-].*$::'`
if test z$OS = zMINGW32; then
EXE=.exe
else
EXE=
fi
PLATFORM=$1
PKGDIR=$2
WASPVM=waspvm-$PLATFORM$EXE
rm -rf $PKGDIR
mkdir -pm 0755 $PKGDIR
cp -rf mod/* $PKGDIR
cp -rf stubs/$WASPVM $PKGDIR
rm $PKGDIR/local-* $(find $PKGDIR -name '*.mf')
cd $PKGDIR
cat >site/config.ms <<EOF
;;; Generated by package.sh
(set-site-config! 'stub-path ".")
(set-site-config! 'bin-path ".")
(set-site-config! 'mod-path '("."))
EOF
../waspc$EXE -exe waspc$EXE -stub $WASPVM bin/waspc
../waspc$EXE -exe wasp$EXE -stub $WASPVM bin/wasp
## TODO: This is bogus..
if test z$EXE = z.exe; then
../waspc -exe waspdoc$EXE -stub $WASPVM bin/waspdoc
../waspc$EXE -exe mosref$EXE -stub $WASPVM bin/mosref
fi