-
Notifications
You must be signed in to change notification settings - Fork 29
/
bootstrap.sh
executable file
·37 lines (35 loc) · 993 Bytes
/
bootstrap.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
#!/bin/sh
if [ -e antlr-3.2.jar ]; then
true
else
echo "Downloading ANTLR 3.2 JAR from http://www.antlr.org/download.html"
wget -c http://www.antlr.org/download/antlr-3.2.jar || \
(echo "Failed to download ANTLR. Aborting."; exit 1)
fi
if [ -e antlr-3.2/lib/libantlr3c.a -o -e libantlr3c-3.2.tar.gz ]; then
true
else
echo "Downloading ANTLR 3.2 C Runtime from http://www.antlr.org/download/C"
wget -c http://www.antlr.org/download/C/libantlr3c-3.2.tar.gz || \
(echo "Failed to download ANTLR. Aborting."; exit 1)
fi
if [ -e antlr-3.2/lib/libantlr3c.a ]; then
true
else
MYPWD="$PWD"
FLAGS64=
if uname -m | grep x86_64; then
FLAGS64=--enable-64bit ;
fi
tar -zxf libantlr3c-3.2.tar.gz && \
cd libantlr3c-3.2 && \
./configure --prefix="$MYPWD"/antlr-3.2 $FLAGS64 --disable-shared && \
make && \
make install
fi
if [ -e antlr-3.2.jar -o -e antlr-3.2/lib/libantlr3c.a ]; then
true
else
exit 1
fi
echo "Type 'make' to compile javascript files."