commit fb0e7bff261b3a28dd1ce3f3604e30afb7c1dcb8 parent abe1d077a03f7986d3f10fa6498e2f837885ff5a Author: falkTX <falktx@falktx.com> Date: Wed, 28 Feb 2024 15:43:49 +0100 Fix for missing realpath on macOS Signed-off-by: falkTX <falktx@falktx.com> Diffstat:
M | utils/generate-ttl.sh | | | 2 | +- |
M | utils/package-osx-bundles.sh | | | 7 | +++++++ |
2 files changed, 8 insertions(+), 1 deletion(-)
diff --git a/utils/generate-ttl.sh b/utils/generate-ttl.sh @@ -1,6 +1,6 @@ #!/bin/bash -# function not available on some systems +# the realpath function is not available on some systems if ! which realpath &>/dev/null; then function realpath() { [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" diff --git a/utils/package-osx-bundles.sh b/utils/package-osx-bundles.sh @@ -1,5 +1,12 @@ #!/bin/bash +# the realpath function is not available on some systems +if ! which realpath &>/dev/null; then + function realpath() { + [[ $1 = /* ]] && echo "$1" || echo "$PWD/${1#./}" + } +fi + set -e DPF_UTILS_DIR="$(dirname $(realpath ${0}))"