realpath only for darwin

This commit is contained in:
ville rantanen
2017-06-09 21:24:04 +03:00
parent 3bc00aa716
commit 04cef26db6

10
rc
View File

@@ -1,6 +1,12 @@
# source me to enable tools # source me to enable tools
case $OSTYPE in
TOOLSPATH=$( realpath $( dirname "$BASH_SOURCE" ) ) darwin*)
TOOLSPATH=$( realpath $( dirname "$BASH_SOURCE" ) )
;;
*)
TOOLSPATH=$( readlink -f $( dirname "$BASH_SOURCE" ) )
;;
esac
PATH=$PATH:"$TOOLSPATH"/bin PATH=$PATH:"$TOOLSPATH"/bin
[[ "$1" = "-f" ]] && PATH="$TOOLSPATH"/bin:$PATH [[ "$1" = "-f" ]] && PATH="$TOOLSPATH"/bin:$PATH