aboutsummaryrefslogtreecommitdiff
path: root/scripts/cbc_functions.inc
diff options
context:
space:
mode:
authorJoe Hunkeler <jhunk@stsci.edu>2015-12-01 20:56:30 -0500
committerJoe Hunkeler <jhunk@stsci.edu>2015-12-01 20:56:30 -0500
commitb004deb0eca736cb844cc927462b9e03e35a8287 (patch)
tree5411fa82eebe7e9f899aeb8d38c09a2841036432 /scripts/cbc_functions.inc
parenta62ac34c8195b45efb75c693d20bd6afb7ab2b70 (diff)
downloadcbc-b004deb0eca736cb844cc927462b9e03e35a8287.tar.gz
OSX compatibility code
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 {