-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_env
executable file
·74 lines (55 loc) · 1.15 KB
/
setup_env
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
#!/bin/bash
echo ""
set -e
if [ ! -d "env" ]
then
echo 'making env'
python3 -m venv env
. env/bin/activate
echo 'installing requirements'
pip install -r requirements.txt
else
echo "##### a directory named 'env' already exists ####"
fi
echo ""
if [ ! -d "instance" ]
then
echo 'create instance directory'
mkdir instance
touch instance/__init__.py
cp default_site_settings.confg instance/site_settings.py
else
echo "###### a directory named 'instance' already exists #####"
fi
echo ""
if [ ! -d "resource" ]
then
echo 'create resource directory'
mkdir resource
touch resource/__init__.py
mkdir resource/static
else
echo "###### a directory named 'resource' already exists #####"
fi
echo ""
if [ ! -d "templates" ]
then
echo 'create templates directory'
mkdir templates
else
echo "###### a directory named 'templates' already exists #####"
fi
echo ""
if [ -f 'clone_all' ]
then
. clone_all
fi
echo ""
if [ -d 'tmp' ]
then
mkdir "tmp"
fi
touch tmp/restart.txt
echo ""
echo "Don't forget to update instance/site_settings.py before launching the app for the first time"
echo ""