forked from harlo/dl_badges
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsetup.sh
More file actions
55 lines (44 loc) · 680 Bytes
/
setup.sh
File metadata and controls
55 lines (44 loc) · 680 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
46
47
48
49
50
51
52
53
54
55
#! /bin/bash
function run_docker_routine {
chmod +x .routine.sh
./.routine.sh
rm .routine.sh
rm Dockerfile
}
function do_exit {
deactivate venv
exit
}
# Create virtualenv
virtualenv venv
source venv/bin/activate
# Install python requirements
pip install -r dutils/requirements.txt
python dl_badges.py init $1
DID_INIT=$?
if ([ $DID_INIT -eq 0 ])
then
run_docker_routine
else
echo "FAILED."
do_exit
fi
python dl_badges.py build
DID_BUILD=$?
if ([ $DID_BUILD -eq 0 ])
then
run_docker_routine
else
echo "FAILED."
do_exit
fi
python dl_badges.py commit
DID_COMMIT=$?
if ([ $DID_COMMIT -eq 0 ])
then
run_docker_routine
echo "OK!"
else
echo "FAILED."
fi
do_exit