conda.csh 3.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. setenv CONDA_EXE "/croot/conda_1689269889729/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin/conda"
  2. setenv _CONDA_ROOT "/croot/conda_1689269889729/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p"
  3. setenv _CONDA_EXE "/croot/conda_1689269889729/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin/conda"
  4. setenv CONDA_PYTHON_EXE "/croot/conda_1689269889729/_h_env_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_placehold_p/bin/python"
  5. # Copyright (C) 2012 Anaconda, Inc
  6. # SPDX-License-Identifier: BSD-3-Clause
  7. if (! $?_CONDA_EXE) then
  8. set _CONDA_EXE="${PWD}/conda/shell/bin/conda"
  9. else
  10. if ("$_CONDA_EXE" == "") then
  11. set _CONDA_EXE="${PWD}/conda/shell/bin/conda"
  12. endif
  13. endif
  14. if ("`alias conda`" == "") then
  15. if ($?_CONDA_EXE) then
  16. # _CONDA_PFX is named so as not to cause confusion with CONDA_PREFIX
  17. # If nested backticks were possible we wouldn't use any variables here.
  18. set _CONDA_PFX=`dirname "${_CONDA_EXE}"`
  19. set _CONDA_PFX=`dirname "${_CONDA_PFX}"`
  20. alias conda source "${_CONDA_PFX}/etc/profile.d/conda.csh"
  21. # And for good measure, get rid of it afterwards.
  22. unset _CONDA_PFX
  23. else
  24. alias conda source "${PWD}/conda/shell/etc/profile.d/conda.csh"
  25. endif
  26. setenv CONDA_SHLVL 0
  27. if (! $?prompt) then
  28. set prompt=""
  29. endif
  30. else
  31. switch ( "${1}" )
  32. case "activate":
  33. set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh activate '${2}' ${argv[3-]})`"
  34. set conda_tmp_status=$status
  35. if( $conda_tmp_status != 0 ) exit ${conda_tmp_status}
  36. eval "${ask_conda}"
  37. rehash
  38. breaksw
  39. case "deactivate":
  40. set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh deactivate '${2}' ${argv[3-]})`"
  41. set conda_tmp_status=$status
  42. if( $conda_tmp_status != 0 ) exit ${conda_tmp_status}
  43. eval "${ask_conda}"
  44. rehash
  45. breaksw
  46. case "install" | "update" | "upgrade" | "remove" | "uninstall":
  47. $_CONDA_EXE $argv[1-]
  48. set ask_conda="`(setenv prompt '${prompt}' ; '${_CONDA_EXE}' shell.csh reactivate)`"
  49. set conda_tmp_status=$status
  50. if( $conda_tmp_status != 0 ) exit ${conda_tmp_status}
  51. eval "${ask_conda}"
  52. rehash
  53. breaksw
  54. default:
  55. $_CONDA_EXE $argv[1-]
  56. breaksw
  57. endsw
  58. endif