-
Notifications
You must be signed in to change notification settings - Fork 1
/
buildenv.sh
executable file
·72 lines (57 loc) · 2.05 KB
/
buildenv.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
function do_create {
[ ! -d build ] && mkdir build
pip install --download='./build' --no-install -r requirements.txt
unzip -q build/django-autoload-*.zip -d build
unzip -q build/django-dbindexer-*.zip -d build
unzip -q build/django-1.4.9.zip -d build
unzip -q build/djangoappengine-*.zip -d build
unzip -q build/djangotoolbox-*.zip -d build
unzip -q build/django-permission-backend-nonrel*.zip -d build
unzip -q build/gaepytz-*.zip -d build
tar -jxvf build/pytz-*.tar.bz2 -C build
tar -zxvf build/django-admin-bootstrapped-*.tar.gz -C build
cp -r build/django-autoload/autoload ./radiocicletta-server/autoload
cp -r build/django-dbindexer/dbindexer ./radiocicletta-server/dbindexer
cp -r build/django/django ./radiocicletta-server/django
cp -r build/djangoappengine/djangoappengine ./radiocicletta-server/djangoappengine
cp -r build/djangotoolbox/djangotoolbox ./radiocicletta-server/djangotoolbox
cp -r build/django-permission-backend-nonrel/permission_backend_nonrel ./radiocicletta-server/permission_backend_nonrel
cp -R build/pytz-*/pytz/ ./radiocicletta-server/pytz
cp -R build/gaepytz/pytz/ ./radiocicletta-server/pytz
rm -rf ./radiocicletta-server/pytz/zoneinfo
cp -r build/django-admin-bootstrapped-*/django_admin_bootstrapped ./radiocicletta-server/django_admin_bootstrapped
}
function do_removepackages {
rm -rf ./radiocicletta-server/autoload
rm -rf ./radiocicletta-server/dbindexer
rm -rf ./radiocicletta-server/django
rm -rf ./radiocicletta-server/djangoappengine
rm -rf ./radiocicletta-server/djangotoolbox
rm -rf ./radiocicletta-server/permission_backend_nonrel
rm -rf ./radiocicletta-server/pytz
rm -rf ./radiocicletta-server/django_admin_bootstrapped
}
function do_clean {
rm -rf ./build ./src
}
case "$1" in
create)
echo "Creating environment"
do_create
;;
replace)
echo "Recreating environment"
do_removepackages
do_create
;;
clean)
echo "Cleaning environment"
do_clean
;;
*)
echo "Usage: $0 {create|replace|clean}"
exit 1
;;
esac
exit 0