2013-08-26 14:09:56 +02:00
|
|
|
#!/bin/sh
|
|
|
|
## This is a compatibility wrapper for 'realpath'.
|
|
|
|
|
2014-01-03 19:13:07 +01:00
|
|
|
if command -v greadlink >/dev/null 2>&1; then
|
2013-08-26 14:09:56 +02:00
|
|
|
## On BSD systems, we might have greadlink
|
|
|
|
greadlink -f "$@"
|
2014-01-03 19:13:07 +01:00
|
|
|
elif command -v readlink >/dev/null 2>&1 && [ "$(uname)" = "Linux" ]; then
|
2013-08-26 14:09:56 +02:00
|
|
|
readlink -f "$@"
|
|
|
|
else
|
|
|
|
## Dirty fallback
|
|
|
|
echo "$@"
|
2013-10-27 19:50:23 +01:00
|
|
|
fi
|