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>
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 6342857..b17b46d 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>"