-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfantastico_setup_project.sh
executable file
·53 lines (38 loc) · 1.39 KB
/
fantastico_setup_project.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
45
46
47
48
49
50
51
52
53
#!/bin/bash
if [ -z "$1" ]; then
echo "You must provide python folder from pip library. E.g: python3.2"
exit
fi;
if [ -z "$2" ]; then
echo "You must provide your project name. E.g my-project"
exit
fi;
PYTHON_LIB_FOLDER=$1
PROJECT_NAME=$2
PATH=/bin:/usr/bin:/usr/sbin
echo "Adding Fantastico virtual_env scripts to root folder."
ln -sf pip-deps/scripts/fantastico/virtual_env .
chmod u+x virtual_env/setup_dev_env.sh
./virtual_env/setup_dev_env.sh
cd pip-deps/bin
echo 'Adding Fantastico scripts to path.'
ln -sf ../scripts/fantastico/run_dev_server.sh fantastico_run_dev_server
chmod u+x fantastico_run_dev_server
ln -sf ../scripts/fantastico/run_prod_server.sh fantastico_run_prod_server
chmod u+x fantastico_run_prod_server
ln -sf ../scripts/fantastico/deployment/setup_low_usage_ubuntu.sh fantastico_setup_low_usage_ubuntu
chmod u+x fantastico_setup_low_usage_ubuntu
ln -sf ../scripts/fantastico/deployment/setup_low_usage_s3_ubuntu.sh fantastico_setup_low_usage_s3_ubuntu
chmod u+x fantastico_setup_low_usage_s3_ubuntu
cd ../../
echo "Linking fantastico minimum deps."
ln -sf pip-deps/lib/$PYTHON_LIB_FOLDER/site-packages/fantastico .
if [ ! -d deployment ]; then
mkdir deployment
cp -R pip-deps/scripts/fantastico/deployment/conf deployment/
else
echo "Not overwritting deployment files."
fi
if [ ! -d $PROJECT_NAME ]; then
cp -R pip-deps/scripts/fantastico/project_template/project $PROJECT_NAME
fi