From 98814dc1f03c74c2d12ddae1f4859321a6f24840 Mon Sep 17 00:00:00 2001 From: Alexis de Talhouët Date: Wed, 19 Sep 2018 11:49:04 -0400 Subject: Make realpath be more env agnostic MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit realpath is not available on most Unix system. readlink is more appropriate Change-Id: Idbda95cad4ae6ac391a75d109743cc66ec5f6d41 Issue-ID: INT-666 Signed-off-by: Alexis de Talhouët --- .../src/main/scripts/update-oom-image-versions.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'version-manifest/src') diff --git a/version-manifest/src/main/scripts/update-oom-image-versions.sh b/version-manifest/src/main/scripts/update-oom-image-versions.sh index 6342857c7..b17b46dd1 100755 --- a/version-manifest/src/main/scripts/update-oom-image-versions.sh +++ b/version-manifest/src/main/scripts/update-oom-image-versions.sh @@ -1,5 +1,18 @@ #!/bin/bash +realpath() { + OURPWD="$PWD" + cd "$(dirname "$1")" + LINK=$(readlink "$(basename "$1")") + while [ "$LINK" ]; do + cd "$(dirname "$LINK")" + LINK=$(readlink "$(basename "$1")") + done + REALPATH="$PWD/$(basename "$1")" + cd "$OURPWD" + echo "$REALPATH" +} + if [ "$#" -ne 2 ]; then echo This script updates OOM helm charts to use versions in docker-manifest.csv echo "$0 " -- cgit 1.2.3-korg