Use "readlink -f" if realpath command is not available

This commit is contained in:
Jakub Jirutka 2017-10-11 20:09:05 +02:00
parent b71a6e448b
commit 5059118e8c

View file

@ -84,6 +84,11 @@ readonly VIRTUAL_PKG=".make-$PROGNAME"
: ${APK_OPTS:="--no-progress"}
# For compatibility with systems that does not have "realpath" command.
if ! command -v realpath 2>/dev/null; then
alias realpath='readlink -f'
fi
die() {
printf '\033[1;31mERROR:\033[0m %s\n' "$@" >&2 # bold red
exit 1