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