-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.sh
More file actions
executable file
·45 lines (35 loc) · 791 Bytes
/
setup.sh
File metadata and controls
executable file
·45 lines (35 loc) · 791 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
35
36
37
38
39
40
41
42
43
44
45
#! /bin/bash
THIS_DIR=`pwd`
if [ $# -eq 0 ]
then
echo "{}" > $THIS_DIR/lib/Frontend/conf/informa.secrets.json
WITH_CONFIG=$THIS_DIR/lib/Frontend/conf/informa.secrets.json
else
WITH_CONFIG=$1
fi
mkdir conf
HAS_VENV=$(which virtualenv)
if [ $? -eq 0 ]; then
HAS_VENV=true
else
HAS_VENV=false
fi
if $HAS_VENV; then
virtualenv $THIS_DIR/.venv
source $THIS_DIR/.venv/bin/activate
fi
cd lib/Frontend
./setup.sh $WITH_CONFIG
cd $THIS_DIR
python setup.py
cd $THIS_DIR/lib/Frontend/web
ln -s $THIS_DIR/web/ extras
cd $THIS_DIR
pip install -r requirements.txt
chmod 0400 conf/informacam.init.json
chmod 0400 lib/Frontend/conf/unveillance.secrets.json
chmod 0400 lib/Frontend/conf/local.config.yaml
python informa_frontend.py -firstuse
if $HAS_VENV; then
deactivate $THIS_DIR/.venv
fi