Use readlink as alternative to realpath

This commit is contained in:
Jan-Philipp Litza 2015-11-07 20:55:30 +01:00
parent d7aac9d8ec
commit aa8297ff1b
1 changed files with 6 additions and 1 deletions

View File

@ -7,7 +7,12 @@ KEYFILE="$HOME/.ecdsakey"
set -eu
export GLUON_SITEDIR="$(dirname "$(realpath "$0")")"
if which realpath > /dev/null; then
GLUON_SITEDIR="$(dirname "$(realpath "$0")")"
else
GLUON_SITEDIR="$(dirname "$(readlink -f "$0")")"
fi
export GLUON_SITEDIR
get_GLUON_TAG() {
if ! git --git-dir="${GLUON_DIR}/.git" describe --exact-match; then