-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathsetup.sh
More file actions
34 lines (28 loc) · 812 Bytes
/
setup.sh
File metadata and controls
34 lines (28 loc) · 812 Bytes
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
#!/usr/bin/env bash
if [[ "$VIRTUAL_ENV" == "" ]]; then
echo "ERROR: Create and activate a virtual environment and try again"
return
fi
pip install -e .
# Add TIMBERPATH to activate script if not already there
activate_path=$VIRTUAL_ENV/bin/activate
TIMBERPATH="$PWD/"
export TIMBERPATH="$TIMBERPATH"
if ! grep -q "$TIMBERPATH" "$activate_path"; then
echo "export TIMBERPATH=${TIMBERPATH}" >> "$activate_path"
echo "Added TIMBERPATH to $activate_path"
fi
# Clone and build libarchive if not present
if [ ! -d "bin/libarchive" ]; then
git clone -b v3.6.2 https://github.com/libarchive/libarchive.git
cd libarchive
cmake . -DCMAKE_INSTALL_PREFIX=../bin/libarchive
make
make install
cd ..
rm -rf libarchive
fi
# Build libtimber if not present
if [ ! -d "bin/libtimber" ]; then
make
fi