Page MenuHomeSoftware Heritage

pythonpath.sh: location independant
ClosedPublic

Authored by seirl on Feb 9 2017, 5:15 PM.

Details

Summary

Allows you to source pythonpath.sh from any directory

Diff Detail

Repository
rDENV Development environment
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

This revision is now accepted and ready to land.Feb 9 2017, 5:21 PM
This revision was automatically updated to reflect the committed changes.

Thanks i have somethink like that in my ~/work/inria/.shrc

export SWH_ENVIRONMENT_HOME=~/work/inria/repo/swh/swh-environment

if [ -d $SWH_ENVIRONMENT_HOME ]; then
  cd $SWH_ENVIRONMENT_HOME
  . ./pythonpath.sh
  cd -
fi

This will permit to simplify to:

export SWH_ENVIRONMENT_HOME=~/work/inria/repo/swh/swh-environment

[ -d $SWH_ENVIRONMENT_HOME ] && . $SWH_ENVIRONMENT_HOME/pythonpath.sh