daily pastebin goal
92%
SHARE
TWEET

Untitled

a guest Feb 17th, 2018 61 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #!/bin/sh
  2.  
  3. ENVNAME=$1
  4. # Directory that contains the venvs
  5. PYV_ROOT=${HOME}
  6.  
  7. ENV_ROOT="${PYV_ROOT}/.pyv/${ENVNAME}/bin"
  8.  
  9. # Check the number of arguments
  10. if [ "$#" -eq 1 ] && [ -d "${ENV_ROOT}" ]; then
  11.     echo "Activating ${1}"
  12.     export OLD_LD_LIBRARY_PATH=$LD_LIBRARY_PATH
  13.     export OLD_PATH=$PATH
  14.     export OLD_PS1="$PS1"
  15.  
  16.     export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
  17.     export PATH=${PYV_ROOT}/.pyv/${ENVNAME}/bin:/usr/local/cuda/bin:$PATH
  18.     export PS1="(${ENVNAME})$PS1"
  19. else
  20.     echo "Please put the environment name as argument, you put ${1}" >&2
  21. fi
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top