Skip to content

Commit

Permalink
Consolidate enviromnent variable settings
Browse files Browse the repository at this point in the history
into lockerbox_environment.sh
  • Loading branch information
Matt Zimmerman committed Dec 14, 2011
1 parent 2dc13cf commit 57cda39
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions lockerbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,17 @@ then
cd "${BASEDIR}"
fi

PYEXE="$(which python)" ; export PYEXE

PATH="${BASEDIR}/local/bin":${PATH} ; export PATH
NODE_PATH="${BASEDIR}/local/lib/node_modules":${NODE_PATH} ; export NODE_PATH
PKG_CONFIG_PATH="${BASEDIR}/local/lib/pkgconfig":${PKG_CONFIG_PATH} ; export PKG_CONFIG_PATH
envscript="${BASEDIR}/lockerbox_environment.sh"
cat >> "$envscript" <<"EOF"
export PATH="${BASEDIR}/local/bin":${PATH}
export NODE_PATH="${BASEDIR}/local/lib/node_modules":${NODE_PATH}
export PKG_CONFIG_PATH="${BASEDIR}/local/lib/pkgconfig":${PKG_CONFIG_PATH}
export CXXFLAGS="-I${BASEDIR}/local/include"
export LD_LIBRARY_PATH="${BASEDIR}/local/lib"
export LIBRARY_PATH="${BASEDIR}/local/lib"
EOF

. "$envscript"

check_for Git git 'git --version'
check_for Python python 'python -V' 2.6
Expand Down Expand Up @@ -159,7 +165,7 @@ then
download "${VIRTUALENV_DOWNLOAD}"
fi

if ${PYEXE} -m virtualenv --no-site-packages "${BASEDIR}/local"
if python -m virtualenv --no-site-packages "${BASEDIR}/local"
then
echo "Set up virtual Python environment."
else
Expand Down Expand Up @@ -262,10 +268,7 @@ cd Locker
echo "Checking out submodules"
git submodule update --init

CXXFLAGS="-I${BASEDIR}/local/include" \
LD_LIBRARY_PATH="${BASEDIR}/local/lib" \
LIBRARY_PATH="${BASEDIR}/local/lib" \
npm install
npm install

echo "Installing Python modules"
if ! python setupEnv.py; then
Expand Down

0 comments on commit 57cda39

Please sign in to comment.