-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sh
executable file
·47 lines (36 loc) · 1.14 KB
/
build.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
#! /bin/bash
WORKING_DIRECTORY="./scratch"
if [[ "X" == "X$WORKING_DIRECTORY" ]]
then
echo 'Please set a working directory in ./build.sh'
return 1
fi
mkdir -p $WORKING_DIRECTORY
ABS_WORKING_DIRECTORY=`cd "$WORKING_DIRECTORY"; pwd`
PYENV="$ABS_WORKING_DIRECTORY/pyenv"
PIP_DOWNLOAD_CACHE="$ABS_WORKING_DIRECTORY/pip_download_cache"
mkdir -p "$PIP_DOWNLOAD_CACHE"
echo "Working in $ABS_WORKING_DIRECTORY"
echo 'Re-generating ckan-bootstrap.py ...'
python mk-ckan-bootstrap.py
echo "Done."
## echo 'Removing old virtualenv if it exists...'
## rm -rf "$PYENV"
## echo 'Done.'
echo "Building virtual env in \"$PYENV\""
#python ckan-bootstrap.py "$PYENV" 2>&1 | tee "$ABS_WORKING_DIRECTORY/bootstrap.log"
python ckan-bootstrap.py "$PYENV"
echo 'Done.'
### The new acitvate script path points to /usr/lib/ckan/bin
##rm -Rf '/usr/lib/ckan'
##
### make sure directories are present
##mkdir -p '/usr/lib/ckan'
##
### run download all dependancies
##python ckan-bootstrap.py /usr/lib/ckan
##
###virtualenv --relocatable /usr/lib/ckan
##
###sudo fpm -t deb -s dir -n ckan -v 1.8a --iteration 1 -d 'python-virtualenv' --after-install=after-install.sh usr/ etc/
##