realpath only for darwin
This commit is contained in:
10
rc
10
rc
@@ -1,6 +1,12 @@
|
||||
# source me to enable tools
|
||||
|
||||
TOOLSPATH=$( realpath $( dirname "$BASH_SOURCE" ) )
|
||||
case $OSTYPE in
|
||||
darwin*)
|
||||
TOOLSPATH=$( realpath $( dirname "$BASH_SOURCE" ) )
|
||||
;;
|
||||
*)
|
||||
TOOLSPATH=$( readlink -f $( dirname "$BASH_SOURCE" ) )
|
||||
;;
|
||||
esac
|
||||
|
||||
PATH=$PATH:"$TOOLSPATH"/bin
|
||||
[[ "$1" = "-f" ]] && PATH="$TOOLSPATH"/bin:$PATH
|
||||
|
||||
Reference in New Issue
Block a user