1 # This script adds toolchains built by doit to $PATH. It should sourced from within bash like:
6 DIR
=`dirname "$BASH_SOURCE"`
7 SELF
=`basename "$BASH_SOURCE"`
8 # OSX readlink doesn't support -f, but greadlink is the gnu version
10 READLINK
=`which greadlink || which readlink`
12 if [ "${BASH_SOURCE[0]}" = "${0}" ]; then
13 echo "$SELF must be sourced, not executed"
17 for p
in `ls -d $DIR/*-$OS-$HOSTARCH | grep -v build`;
19 if [ -d $p/bin
]; then
20 ABS_PATH
=`$READLINK -f $p`
21 echo "added $ABS_PATH";
22 export PATH
=$ABS_PATH/bin
:$PATH;