-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDoAll
More file actions
executable file
·49 lines (38 loc) · 1.1 KB
/
DoAll
File metadata and controls
executable file
·49 lines (38 loc) · 1.1 KB
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
#!/bin/bash
cd "$(dirname "$0")"
cwd=`pwd`
./MakeClean 2>> log
exec &> outlog
echo "[`date`] Starting DoAll script" | tee -a log
mkdir -p auto/tmp auto/html
# Create virtual environment
cd ${cwd}
echo "[`date`] Creating virtual environment" | tee -a log
./MakeVirtualEnvironment 2>> log
# Activate virtual environment
cd ${cwd}
echo "[`date`] Activating virtual environment" | tee -a log
source auto/virtualenv/bin/activate
# Initialise databases
cd ${cwd}
echo "[`date`] Initialising databases" | tee -a log
cd build/initdb
python main_initdb.py 2>> ../../log
python makelive.py 2>> ../../log
# Create plane database
cd ${cwd}
echo "[`date`] Create aircraft database" | tee -a log
cd build/plane_database
python make_plane_database.py 2>> ../../log
# Generate website
cd ${cwd}
echo "[`date`] Making HTML" | tee -a log
cd build/makehtml
python main_makehtml.py 2>> ../../log
# Generate SQL dump
cd ${cwd}
echo "[`date`] Making sql dump" | tee -a log
cd auto
mysqldump --defaults-extra-file=mysql_login.cfg adsb | gzip > mysqlDump.sql.gz 2>> ../log
cd ${cwd}
echo "[`date`] Finishing DoAll script" | tee -a log