Skip to content

Instantly share code, notes, and snippets.

View TheMarex's full-sized avatar

Patrick Niklaus TheMarex

View GitHub Profile
@nzjrs
nzjrs / env.sh
Last active December 21, 2015 07:08
Lame virtualenv / jhbuild clone
#get the current directory. from
#http://stackoverflow.com/questions/59895/can-a-bash-script-tell-what-directory-its-stored-in
pushd . > /dev/null
DIR="${BASH_SOURCE[0]}";
if ([ -h "${DIR}" ]) then
while([ -h "${DIR}" ]) do cd `dirname "$DIR"`; DIR=`readlink "${DIR}"`; done
fi
cd `dirname ${DIR}` > /dev/null
DIR=`pwd`;
popd > /dev/null