aboutsummaryrefslogtreecommitdiff
path: root/scripts/cbc_functions.inc
diff options
context:
space:
mode:
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 {