diff options
author | Joseph Hunkeler <jhunk@stsci.edu> | 2015-12-10 20:03:18 -0500 |
---|---|---|
committer | Joseph Hunkeler <jhunk@stsci.edu> | 2015-12-10 20:03:18 -0500 |
commit | e2d622813533fe1291da547688c0442a61a4ba21 (patch) | |
tree | f1d08ecef00e6a5326e88a1772c14a188397264d /scripts/cbc_functions.inc | |
parent | 1161b681e794ed034f6d43f5995dda71f7fbb5d0 (diff) | |
parent | b004deb0eca736cb844cc927462b9e03e35a8287 (diff) | |
download | cbc-e2d622813533fe1291da547688c0442a61a4ba21.tar.gz |
Merge branch 'master' of bitbucket.org:jhunkeler/cbc1.3.2
Diffstat (limited to 'scripts/cbc_functions.inc')
-rw-r--r-- | scripts/cbc_functions.inc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/scripts/cbc_functions.inc b/scripts/cbc_functions.inc index 6713d81..14586a0 100644 --- a/scripts/cbc_functions.inc +++ b/scripts/cbc_functions.inc @@ -36,12 +36,28 @@ function user_choice { } +function pyreadlink { + TARGET="$1" + python -c "import os; print(os.path.realpath('${TARGET}'))" +} + function get_conda_build { _OK=`program_exists conda` if [ ! $_OK ]; then echo '' fi - echo $( echo $( readlink -f $(dirname `which conda`)/../conda-bld ) ) + + get_os_info + case "$OS" in + osx) + pyreadlink $(dirname `which conda`)/../conda-bld + ;; + linux) + readlink -f $(dirname `which conda`)/../conda-bld + ;; + *) + ;; + esac } function get_conda_repo { |