ambevar-dotfiles/.scripts/realpath

12 lines
296 B
Plaintext
Raw Normal View History

2013-08-26 14:09:56 +02:00
#!/bin/sh
## This is a compatibility wrapper for 'realpath'.
if [ -z "$(command -v greadlink)" ]
## On BSD systems, we might have greadlink
greadlink -f "$@"
elif [ -z "$(command -v readlink)" ] && [ "$(uname)" = "Linux" ]
readlink -f "$@"
else
## Dirty fallback
echo "$@"
fi