aboutsummaryrefslogtreecommitdiffstats
path: root/version-manifest/src
diff options
context:
space:
mode:
authorAlexis de Talhouët <adetalhouet89@gmail.com>2018-09-19 11:49:04 -0400
committerAlexis de Talhouët <alexis.de_talhouet@bell.ca>2018-09-19 15:55:24 +0000
commit98814dc1f03c74c2d12ddae1f4859321a6f24840 (patch)
tree4a32d86c0bdd39ce2f930ce23cc6fda0b64936dd /version-manifest/src
parent59cb76b3cb49ee56db4f1f7846116687aeca62db (diff)
Make realpath be more env agnostic
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 <adetalhouet89@gmail.com>
Diffstat (limited to 'version-manifest/src')
-rwxr-xr-xversion-manifest/src/main/scripts/update-oom-image-versions.sh13
1 files changed, 13 insertions, 0 deletions
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 <docker-manifest.csv> <oom repo directory>"