diff --git a/packages/genpkg.sh b/packages/genpkg.sh index ad22087..080f0f3 100755 --- a/packages/genpkg.sh +++ b/packages/genpkg.sh @@ -15,7 +15,16 @@ up() } # pivot -cur=$(dirname "$(readlink -f "${0}")") +rl="readlink -f" +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found!" && exit 1 + fi +fi +# cur +cur=`dirname $(${rl} "${0}")` opwd=`pwd` pkgfile="PKGBUILD" cd ${cur} diff --git a/tests.sh b/tests.sh index adfee97..814de04 100755 --- a/tests.sh +++ b/tests.sh @@ -54,7 +54,15 @@ ${nosebin} --version export DOTDROP_FORCE_NODEBUG=yes # coverage file location -cur=`dirname $(readlink -f "${0}")` +rl="readlink -f" +if ! ${rl} "${0}" >/dev/null 2>&1; then + rl="realpath" + + if ! hash ${rl}; then + echo "\"${rl}\" not found!" && exit 1 + fi +fi +cur=`dirname $(${rl} "${0}")` workers=${DOTDROP_WORKERS} if [ ! -z ${workers} ]; then