Commit bc8a855b authored by Noah Zoschke's avatar Noah Zoschke

indent function

parent 4bc58f60
...@@ -11,10 +11,11 @@ NAME=$($BIN_DIR/detect $BUILD_DIR) ...@@ -11,10 +11,11 @@ NAME=$($BIN_DIR/detect $BUILD_DIR)
PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads} PIP_DOWNLOAD_CACHE=${PIP_DOWNLOAD_CACHE:-$CACHE_DIR/pip_downloads}
VIRTUALENV_DIRS="bin include lib" VIRTUALENV_DIRS="bin include lib"
function sed() { sed() {
# prefer GNU sed over BSD sed on OS X # prefer GNU sed over BSD sed on OS X
$(which gsed || which sed) "$@" $(which gsed || which sed) "$@"
} }
indent() { sed -u "s/^/ /"; }
cd $BUILD_DIR cd $BUILD_DIR
...@@ -30,7 +31,7 @@ for dir in $VIRTUALENV_DIRS; do ...@@ -30,7 +31,7 @@ for dir in $VIRTUALENV_DIRS; do
done done
echo "-----> Preparing virtualenv version $(virtualenv --version)" echo "-----> Preparing virtualenv version $(virtualenv --version)"
virtualenv --no-site-packages . | sed -u 's/^/ /' virtualenv --no-site-packages . | indent
#echo "-----> Byte-compiling code" #echo "-----> Byte-compiling code"
find . -name "*.py" | grep -v bin/manage.py | xargs bin/python -m py_compile find . -name "*.py" | grep -v bin/manage.py | xargs bin/python -m py_compile
...@@ -69,13 +70,13 @@ EOF ...@@ -69,13 +70,13 @@ EOF
fi fi
echo "-----> Installing dependencies using pip version $(bin/pip --version | awk '{print $2}')" echo "-----> Installing dependencies using pip version $(bin/pip --version | awk '{print $2}')"
PIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE bin/pip install --use-mirrors -r requirements.txt | sed -u 's/^/ /' PIP_DOWNLOAD_CACHE=$PIP_DOWNLOAD_CACHE bin/pip install --use-mirrors -r requirements.txt | indent
set +e set +e
OUT=$(virtualenv --relocatable .) OUT=$(virtualenv --relocatable .)
[ $? -ne 0 ] && { [ $? -ne 0 ] && {
echo " ! Error making virtualenv relocatable" echo " ! Error making virtualenv relocatable"
echo "$OUT" | sed -u 's/^/ /' echo "$OUT" | indent
exit 1 exit 1
} }
set -e set -e
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment