karaf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbono...@apache.org
Subject [karaf] branch karaf-4.2.x updated: [KARAF-6254] Use backticks for command substitution
Date Sun, 05 May 2019 11:47:10 GMT
This is an automated email from the ASF dual-hosted git repository.

jbonofre pushed a commit to branch karaf-4.2.x
in repository https://gitbox.apache.org/repos/asf/karaf.git


The following commit(s) were added to refs/heads/karaf-4.2.x by this push:
     new 381565f  [KARAF-6254] Use backticks for command substitution
381565f is described below

commit 381565f7bbe71ea88cd6cbd78860ade6b8eb1976
Author: Baptiste DA ROIT <baptiste.daroit@gmail.com>
AuthorDate: Wed Apr 24 12:00:57 2019 +0200

    [KARAF-6254] Use backticks for command substitution
---
 .../main/filtered-resources/resources/bin/client   | 35 ++++++++--------
 .../src/main/filtered-resources/resources/bin/inc  | 48 +++++++++++----------
 .../main/filtered-resources/resources/bin/instance | 35 ++++++++--------
 .../main/filtered-resources/resources/bin/karaf    | 49 +++++++++++-----------
 .../main/filtered-resources/resources/bin/shell    | 35 ++++++++--------
 .../main/filtered-resources/resources/bin/start    | 35 ++++++++--------
 .../main/filtered-resources/resources/bin/status   | 35 ++++++++--------
 .../src/main/filtered-resources/resources/bin/stop | 35 ++++++++--------
 8 files changed, 158 insertions(+), 149 deletions(-)

diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/client b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
index 0ab0bec..0671723 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/client
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/client
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-            echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 
 #
 # Load common functions
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/inc b/assemblies/features/base/src/main/filtered-resources/resources/bin/inc
index 313e680..951a71e 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/inc
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/inc
@@ -34,7 +34,7 @@ detectOS() {
     os400=false;
     hpux=false;
     solaris=false;
-    case "$(uname)" in
+    case "`uname`" in
         CYGWIN*)
             cygwin=true
             ;;
@@ -72,9 +72,9 @@ unlimitFD() {
     fi
 
     # Increase the maximum file descriptors if we can
-    if [ "x$(command -v ulimit)" != "x" ] && [ "${os400}" = "false" ] ; then
+    if [ "x`command -v ulimit`" != "x" ] && [ "${os400}" = "false" ] ; then
         if [ "${MAX_FD}" = "maximum" ] || [ "${MAX_FD}" = "max" ]; then
-            MAX_FD_LIMIT=$(ulimit -H -n)
+            MAX_FD_LIMIT=`ulimit -H -n`
             if [ $? -eq 0 ]; then
                 # use the system max
                 MAX_FD="${MAX_FD_LIMIT}"
@@ -100,7 +100,7 @@ locateHome() {
         # In POSIX shells, CDPATH may cause cd to write to stdout
         (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
         # KARAF_HOME is not provided, fall back to default
-        KARAF_HOME=$(cd "${DIRNAME}/.." || exit 2; pwd)
+        KARAF_HOME=`cd "${DIRNAME}/.." || exit 2; pwd`
     fi
 
     if [ ! -d "${KARAF_HOME}" ]; then
@@ -158,7 +158,7 @@ setupNativePath() {
 
     # For Cygwin, set PATH from LD_LIBRARY_PATH
     if ${cygwin}; then
-        LD_LIBRARY_PATH=$(cygpath --path --windows "${LD_LIBRARY_PATH}")
+        LD_LIBRARY_PATH=`cygpath --path --windows "${LD_LIBRARY_PATH}"`
         PATH="${PATH};${LD_LIBRARY_PATH}"
         export PATH
     fi
@@ -168,18 +168,18 @@ setupNativePath() {
 pathCanonical() {
     dst="${1}"
     while [ -h "${dst}" ] ; do
-        ls=$(ls -ld "${dst}")
-        link=$(expr "${ls}" : '.*-> \(.*\)$')
+        ls=`ls -ld "${dst}"`
+        link=`expr "${ls}" : '.*-> \(.*\)$'`
         if expr "${link}" : '/.*' > /dev/null; then
             dst="${link}"
         else
-            dst="$(dirname "${dst}")/${link}"
+            dst="`dirname "${dst}"`/${link}"
         fi
     done
-    bas=$(basename "${dst}")
-    dir=$(dirname "${dst}")
+    bas=`basename "${dst}"`
+    dir=`dirname "${dst}"`
     if [ "${bas}" != "${dir}" ]; then
-        dst="$(pathCanonical "${dir}")/${bas}"
+        dst="`pathCanonical "${dir}"`/${bas}"
     fi
     echo "${dst}" | sed -e 's#//#/#g' -e 's#/./#/#g' -e 's#/[^/]*/../#/#g'
 }
@@ -187,15 +187,15 @@ pathCanonical() {
 locateJava() {
     # Setup the Java Virtual Machine
     if ${cygwin} ; then
-        [ -n "${JAVA}" ] && JAVA=$(cygpath --unix "${JAVA}")
-        [ -n "${JAVA_HOME}" ] && JAVA_HOME=$(cygpath --unix "${JAVA_HOME}")
+        [ -n "${JAVA}" ] && JAVA=`cygpath --unix "${JAVA}"`
+        [ -n "${JAVA_HOME}" ] && JAVA_HOME=`cygpath --unix "${JAVA_HOME}"`
     fi
 
     if [ "x${JAVA_HOME}" = "x" ] && [ "${darwin}" = "true" ]; then
-        JAVA_HOME="$(/usr/libexec/java_home -v 1.8)"
+        JAVA_HOME="`/usr/libexec/java_home -v 1.8`"
     fi
     if [ "x${JAVA_HOME}" = "x" ] && [ -r /etc/gentoo-release ] ; then
-        JAVA_HOME=$(java-config --jre-home)
+        JAVA_HOME=`java-config --jre-home`
     fi
     if [ "x${JAVA}" = "x" ]; then
         if [ "x${JAVA_HOME}" != "x" ]; then
@@ -205,14 +205,16 @@ locateJava() {
             JAVA="${JAVA_HOME}/bin/java"
         else
             warn "JAVA_HOME not set; results may vary"
-            JAVA=$(command -v java)
+            JAVA=`command -v java`
             if [ "x${JAVA}" = "x" ]; then
                 die "java command not found"
             fi
         fi
     fi
     if [ "x${JAVA_HOME}" = "x" ]; then
-        JAVA_HOME="$(dirname "$(dirname "$(pathCanonical "${JAVA}")")")"
+        JAVA_BIN=`pathCanonical "${JAVA}"`
+        JAVA_BIN_DIR=`dirname "${JAVA_BIN}"`
+        JAVA_HOME="`dirname "${JAVA_BIN_DIR}"`"
     fi
 }
 
@@ -241,7 +243,7 @@ checkJvmVersion() {
         fi
     fi
 
-    VERSION=$("${JAVA}" -version 2>&1 | ${AWK} -F '"' '/version/ {print $2}' | sed
-e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;')
+    VERSION=`"${JAVA}" -version 2>&1 | ${AWK} -F '"' '/version/ {print $2}' | sed
-e 's/_.*//g; s/^1\.//g; s/\..*//g; s/-.*//g;'`
 
     # java must be at least version 8
     if [ "${VERSION}" -lt "8" ]; then
@@ -316,19 +318,19 @@ setupDefaults() {
 convertPaths() {
     if $cygwin; then
         if [ ! -z "${KARAF_HOME}" ]; then
-            KARAF_HOME=$(cygpath --path --windows "${KARAF_HOME}")
+            KARAF_HOME=`cygpath --path --windows "${KARAF_HOME}"`
         fi
         if [ ! -z "${KARAF_BASE}" ]; then
-            KARAF_BASE=$(cygpath --path --windows "${KARAF_BASE}")
+            KARAF_BASE=`cygpath --path --windows "${KARAF_BASE}"`
         fi
         if [ ! -z "${KARAF_DATA}" ]; then
-            KARAF_DATA=$(cygpath --path --windows "${KARAF_DATA}")
+            KARAF_DATA=`cygpath --path --windows "${KARAF_DATA}"`
         fi
         if [ ! -z "${KARAF_ETC}" ]; then
-            KARAF_ETC=$(cygpath --path --windows "${KARAF_ETC}")
+            KARAF_ETC=`cygpath --path --windows "${KARAF_ETC}"`
         fi
         if [ ! -z "${CLASSPATH}" ]; then
-            CLASSPATH=$(cygpath --path --windows "${CLASSPATH}")
+            CLASSPATH=`cygpath --path --windows "${CLASSPATH}"`
         fi
     fi
 }
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
index 7a7ba72..12c0596 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/instance
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-            echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 
 #
 # Load common functions
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
index 1ed6ad1..5aa925c 100644
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/karaf
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-	    echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 LOCAL_CLASSPATH=$CLASSPATH
 
 #
@@ -76,7 +77,7 @@ fi
 
 forceNoRoot() {
     # If configured, prevent execution as root
-    if [ "${KARAF_NOROOT}" ] && [ "$(id -u)" -eq 0 ]; then
+    if [ "${KARAF_NOROOT}" ] && [ "`id -u`" -eq 0 ]; then
         die "Do not run as root!"
     fi
 }
@@ -107,13 +108,13 @@ checkRootInstance() {
    ROOT_INSTANCE_RUNNING=false
    if [ -f "${KARAF_HOME}/instances/instance.properties" ];
    then
-      ROOT_INSTANCE_PID=$(sed -n -e '/item.0.pid/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties")
-      ROOT_INSTANCE_NAME=$(sed -n -e '/item.0.name/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties")
+      ROOT_INSTANCE_PID=`sed -n -e '/item.0.pid/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties"`
+      ROOT_INSTANCE_NAME=`sed -n -e '/item.0.name/ s/.*\= *//p' "${KARAF_HOME}/instances/instance.properties"`
       if [ "${ROOT_INSTANCE_PID}" -ne "0" ]; then
           if ps -p "${ROOT_INSTANCE_PID}" > /dev/null
           then
               MAIN=org.apache.karaf.main.Main
-              PID_COMMAND=$("${PS_PREFIX}"ps -p "${ROOT_INSTANCE_PID}" -o args | sed 1d)
+              PID_COMMAND=`"${PS_PREFIX}"ps -p "${ROOT_INSTANCE_PID}" -o args | sed 1d`
 
               if [ "${PID_COMMAND#*$MAIN}" != "$PID_COMMAND" ]; then
                 ROOT_INSTANCE_RUNNING=true
@@ -183,9 +184,9 @@ run() {
     JAVA_ENDORSED_DIRS="${JAVA_HOME}/jre/lib/endorsed:${JAVA_HOME}/lib/endorsed:${KARAF_HOME}/lib/endorsed"
     JAVA_EXT_DIRS="${JAVA_HOME}/jre/lib/ext:${JAVA_HOME}/lib/ext:${KARAF_HOME}/lib/ext"
     if ${cygwin}; then
-        JAVA_HOME=$(cygpath --path --windows "${JAVA_HOME}")
-        JAVA_ENDORSED_DIRS=$(cygpath --path --windows "${JAVA_ENDORSED_DIRS}")
-        JAVA_EXT_DIRS=$(cygpath --path --windows "${JAVA_EXT_DIRS}")
+        JAVA_HOME=`cygpath --path --windows "${JAVA_HOME}"`
+        JAVA_ENDORSED_DIRS=`cygpath --path --windows "${JAVA_ENDORSED_DIRS}"`
+        JAVA_EXT_DIRS=`cygpath --path --windows "${JAVA_EXT_DIRS}"`
     fi
     convertPaths
     cd "${KARAF_BASE}" || exit 2
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
index 489fa90..cd33991 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/shell
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-            echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 
 #
 # Load common functions
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/start b/assemblies/features/base/src/main/filtered-resources/resources/bin/start
index 047ed1b..0777190 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/start
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/start
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-            echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 
 #
 # Load common functions
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/status b/assemblies/features/base/src/main/filtered-resources/resources/bin/status
index ab05b60..b1eafec 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/status
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/status
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-            echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 
 #
 # Load common functions
diff --git a/assemblies/features/base/src/main/filtered-resources/resources/bin/stop b/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
index 014e71a..17ff7c7 100755
--- a/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
+++ b/assemblies/features/base/src/main/filtered-resources/resources/bin/stop
@@ -27,37 +27,38 @@ realpath() {
       fi
   fi
 
-  READLINK_EXISTS=$(command -v readlink &> /dev/null)
+  READLINK_EXISTS=`command -v readlink &> /dev/null`
+  BINARY_NAME=`basename "${1}"`
   if [ -z "$READLINK_EXISTS" ]; then
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     while [ "${LINK}" ]; do
         echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(ls -l "$(basename "${1}")" | ${AWK} -F"-> " '{print $2}')
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`ls -l "${BINARY_NAME}" | ${AWK} -F"-> " '{print $2}'`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   else
-    OURPWD=${PWD}
-    cd "$(dirname "${1}")" || exit 2
-    LINK=$(readlink "$(basename "${1}")")
+    OURPWD="`pwd`"
+    cd "`dirname "${1}"`" || exit 2
+    LINK=`readlink "${BINARY_NAME}"`
     while [ "${LINK}" ]; do
-            echo "link: ${LINK}" >&2
-        cd "$(dirname "${LINK}")" || exit 2
-        LINK=$(readlink "$(basename "${1}")")
+        echo "link: ${LINK}" >&2
+        cd "`dirname "${LINK}"`" || exit 2
+        LINK=`readlink "${BINARY_NAME}"`
     done
-    REALPATH="${PWD}/$(basename "${1}")"
+    REALPATH="`pwd`/${BINARY_NAME}"
     cd "${OURPWD}" || exit 2
     echo "${REALPATH}"
   fi
 }
 
-REALNAME=$(realpath "$0")
-DIRNAME=$(dirname "${REALNAME}")
-PROGNAME=$(basename "${REALNAME}")
+REALNAME=`realpath "$0"`
+DIRNAME=`dirname "${REALNAME}"`
+PROGNAME=`basename "${REALNAME}"`
 
 #
 # Load common functions


Mime
View raw message