-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.sh
executable file
·41 lines (31 loc) · 1008 Bytes
/
install.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
#!/bin/bash
thisdir=`pwd`
mkdir -p mylibs
### Intalling gzstream (it needs zlib!)
if [[ ! -d mylibs/gzstream ]] || [[ ! -f mylibs/gzstream/gzstream.o ]]; then
rm -rf mylibs
mkdir mylibs
cd mylibs
wget https://www.cs.unc.edu/Research/compgeom/gzstream/gzstream.tgz
if [[ "$?" != 0 ]]; then
echo "Error downloading gzstream, try again"
rm -rf gzstream gzstream.tgz
exit
else
tar -xvzf gzstream.tgz &> /dev/null
if [[ "$?" != 0 ]]; then echo " Error during gzstream un-compressing. Exiting now"; exit; fi
cd gzstream
make &> /dev/null
if [[ "$?" != 0 ]]; then echo " Error during gzstream compilation. Exiting now"; exit; fi
test=`make test | grep "O.K" | wc -l`
if [[ $test == 1 ]]; then echo " "1. gzstream installed; rm ../gzstream.tgz
else echo " Gzstream test failed. Exiting now"; exit; fi
fi
fi
cd $thisdir
if [[ ! -f mylibs/gzstream/gzstream.o ]]; then
echo " !! Error: gzstream not installed properly!";
exit
fi
cd $thisdir
make