[COMMON] Fix read -s, echo -e and $'...' bashisms
[oom.git] / kubernetes / robot / demo-k8s.sh
index d48070c..0d30557 100755 (executable)
@@ -63,7 +63,7 @@ usage ()
 
 # Check if execscript flag is used and drop it from input arguments
 
-if [[ "${!#}" = "execscript" ]]; then
+if [ "${!#}" = "execscript" ]; then
         set -- "${@:1:$#-1}"
         execscript=true
 fi
@@ -93,7 +93,10 @@ do
        case $key in
        init_robot)
                        TAG="UpdateWebPage"
-                       read -s -p "WEB Site Password for user 'test': " WEB_PASSWORD
+                       echo "WEB Site Password for user 'test': "
+                       stty -echo
+                       read WEB_PASSWORD
+                       stty echo
                        if [ "$WEB_PASSWORD" = "" ]; then
                                echo ""
                                echo "WEB Password is required for user 'test'"
@@ -222,7 +225,7 @@ ETEHOME=/var/opt/ONAP
 
 if [ $execscript ]; then
    for script in $(ls -1 "$DIR/$SCRIPTDIR"); do
-      [ -f "$DIR/$SCRIPTDIR/$script" ] && [ -x "$DIR/$SCRIPTDIR/$script" ] && source "$DIR/$SCRIPTDIR/$script"
+      [ -f "$DIR/$SCRIPTDIR/$script" ] && [ -x "$DIR/$SCRIPTDIR/$script" ] && . "$DIR/$SCRIPTDIR/$script"
    done
 fi