From 5059118e8cb7878ea746c589693cfb166a25c9b4 Mon Sep 17 00:00:00 2001 From: Jakub Jirutka Date: Wed, 11 Oct 2017 20:09:05 +0200 Subject: [PATCH] Use "readlink -f" if realpath command is not available --- alpine-make-vm-image | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/alpine-make-vm-image b/alpine-make-vm-image index 6856607..3a0d154 100755 --- a/alpine-make-vm-image +++ b/alpine-make-vm-image @@ -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