-
Notifications
You must be signed in to change notification settings - Fork 18
/
setup.sh
44 lines (39 loc) · 1008 Bytes
/
setup.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
43
44
#!/usr/bin/env bash
if [[ "$VIRTUAL_ENV" == "" ]]
then
echo "ERROR: Create and activate a virtual environment and try again"
return
fi
if ! command -v dot &> /dev/null
then
echo "dot (graphviz) could not be found. Please install it first... (on Ubuntu 'sudo apt-get install graphviz libgraphviz-dev')"
return
fi
python setup.py develop
activate_path=$VIRTUAL_ENV/bin/activate
export TIMBERPATH="$PWD/"
if grep -q $TIMBERPATH $activate_path
then
echo "TIMBER path already in activate"
else
printf "\n\n" > activate_ext.sh.cpy
echo "export TIMBERPATH=${TIMBERPATH}" >> activate_ext.sh.cpy
cat activate_ext.sh >> activate_ext.sh.cpy
source activate_ext.sh.cpy
cat activate_ext.sh.cpy >> $activate_path
rm activate_ext.sh.cpy
fi
if [ ! -d "bin/libarchive" ]
then
git clone https://github.com/libarchive/libarchive.git
cd libarchive
cmake . -DCMAKE_INSTALL_PREFIX=../bin/libarchive
make
make install
cd ..
rm -rf libarchive
fi
if [ ! -d "bin/libtimber" ]
then
make
fi