[VOL-5031] - Pre-release voltha-onos build

[VOL-5099] - verify_foltha-onos-sanity-test FAIL

app-install.sh
tests/version-check.sh
----------------------
  o shellcheck cleanups
  o Improve error detection and reporting.
  o cd '..' early VS resolving relative paths everywhere.
  o Replace $(basename) with shell string builtins.
  o use local vars to shorten paths and avoid extra string concatenation.
  o Added error detection in "<app name=" gathering, shell commands can
    fail allowing manipulation in APP_INSTALL_ROOT VS A_I_R/$name.

Makefile
makefiles/virtualenv.mk
-----------------------
  o Update requirements.txt read check to not require existence
    of an empty *.txt file on disk.

dependencies.xml
----------------
  o Update component dependencies to match the latest deployed versions.
  o https://wiki.opennetworking.org/display/VOLTHA/v2.12+Deployments
  o Still pending: segmentrouting.version and kafka.

Change-Id: I05d2d71521fa56ea788cc959e1ce88b1d38e1b2b
diff --git a/tests/version-check.sh b/tests/version-check.sh
index 0d76faf..e1fb354 100644
--- a/tests/version-check.sh
+++ b/tests/version-check.sh
@@ -1,5 +1,5 @@
+#!/bin/bash
 # Copyright 2021-2024 Open Networking Foundation (ONF) and the ONF Contributors
-
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
 # You may obtain a copy of the License at
@@ -12,16 +12,27 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-CWD=$( dirname ${BASH_SOURCE[0]} )
-NEW_VERSION=$(head -n1 "$CWD/../VERSION")
+set -euo pipefail
+
+pgm_dir="${BASH_SOURCE[0]%/*}"
+cd "$pgm_dir/.."
+
+NEW_VERSION="$(head -n1 'VERSION')"
 
 if [[ "$NEW_VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]
 then
   echo "Version string '$NEW_VERSION' is a SemVer released version!"
-  SNAPSHOTS=$(cat "$CWD/../dependencies.xml" | grep "SNAPSHOT" | wc -l)
-  if [[ "$SNAPSHOTS" -gt 0 ]]
+  declare -i SNAPSHOTS
+  SNAPSHOTS=$(grep --count "SNAPSHOT" 'dependencies.xml')
+  if [[ $SNAPSHOTS -gt 0 ]]
   then
     echo "ERROR: Referring to -SNAPSHOT apps in a released VERSION"
     exit 1
   fi
+
+elif [[ "$NEW_VERSION" =~ '-dev' ]]; then
+    echo "** Developement version detected: $(declare -p NEW_VERSION)"
+
+else
+    echo "** Detected odd version string: $(declare -p NEW_VERSION)"
 fi