aboutsummaryrefslogtreecommitdiff
path: root/scripts/cbc_functions.inc
diff options
context:
space:
mode:
authorJoseph Hunkeler <jhunk@stsci.edu>2015-12-10 20:03:18 -0500
committerJoseph Hunkeler <jhunk@stsci.edu>2015-12-10 20:03:18 -0500
commite2d622813533fe1291da547688c0442a61a4ba21 (patch)
treef1d08ecef00e6a5326e88a1772c14a188397264d /scripts/cbc_functions.inc
parent1161b681e794ed034f6d43f5995dda71f7fbb5d0 (diff)
parentb004deb0eca736cb844cc927462b9e03e35a8287 (diff)
downloadcbc-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.inc18
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 {