Skip to content

Commit

Permalink
Fix readme and use BASH_SOURCE instead of $0
Browse files Browse the repository at this point in the history
  • Loading branch information
benkrikler committed Nov 16, 2017
1 parent 471c141 commit dcf4ee0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ You need to setup python 2.7 and a recent ROOT version first.
git clone https://github.com/cms-nanoAOD/nanoAOD-tools.git NanoAODTools
cd NanoAODTools
bash standalone/env_standalone.sh build
bash standalone/env_standalone.sh
source standalone/env_standalone.sh

Repeat only the last command at the beginning of every session.

Expand Down
6 changes: 3 additions & 3 deletions standalone/env_standalone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
# Please setup python 2.7 and ROOT into your environment first

CWD=$PWD
if [ ${0:0:1} == "/" ]; then
FULLPATH=$0
if [ ${BASH_SOURCE[0]:0:1} == "/" ]; then
FULLPATH=${BASH_SOURCE[0]}
else
FULLPATH=$PWD/$0
FULLPATH=$PWD/${BASH_SOURCE[0]}
fi
cd ${FULLPATH/%env_standalone.sh/}/..

Expand Down

0 comments on commit dcf4ee0

Please sign in to comment.