ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject [1/2] ant git commit: replace backticks with $() - may fix PR 60562
Date Mon, 09 Jan 2017 17:49:38 GMT
Repository: ant
Updated Branches:
  refs/heads/master 94dc12187 -> 9700398e6


replace backticks with $() - may fix PR 60562


Project: http://git-wip-us.apache.org/repos/asf/ant/repo
Commit: http://git-wip-us.apache.org/repos/asf/ant/commit/02aedbc9
Tree: http://git-wip-us.apache.org/repos/asf/ant/tree/02aedbc9
Diff: http://git-wip-us.apache.org/repos/asf/ant/diff/02aedbc9

Branch: refs/heads/master
Commit: 02aedbc903570357c4caa43beb2d9e2dabd7b4fc
Parents: af4eb22
Author: Stefan Bodewig <bodewig@apache.org>
Authored: Mon Jan 9 18:48:35 2017 +0100
Committer: Stefan Bodewig <bodewig@apache.org>
Committed: Mon Jan 9 18:48:35 2017 +0100

----------------------------------------------------------------------
 src/script/ant | 44 ++++++++++++++++++++++----------------------
 1 file changed, 22 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ant/blob/02aedbc9/src/script/ant
----------------------------------------------------------------------
diff --git a/src/script/ant b/src/script/ant
index 780764d..1df00bc 100644
--- a/src/script/ant
+++ b/src/script/ant
@@ -102,12 +102,12 @@ fi
 cygwin=false;
 darwin=false;
 mingw=false;
-case "`uname`" in
+case "$(uname)" in
   CYGWIN*) cygwin=true ;;
   Darwin*) darwin=true
            if [ -z "$JAVA_HOME" ] ; then
                if [ -x '/usr/libexec/java_home' ] ; then
-                   JAVA_HOME=`/usr/libexec/java_home`
+                   JAVA_HOME=$(/usr/libexec/java_home)
                elif [ -d "/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home"
]; then
                    JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
                fi
@@ -119,38 +119,38 @@ esac
 if [ -z "$ANT_HOME" -o ! -d "$ANT_HOME" ] ; then
   ## resolve links - $0 may be a link to ant's home
   PRG="$0"
-  progname=`basename "$0"`
+  progname=$(basename "$0")
 
   # need this for relative symlinks
   while [ -h "$PRG" ] ; do
-    ls=`ls -ld "$PRG"`
-    link=`expr "$ls" : '.*-> \(.*\)$'`
+    ls=$(ls -ld "$PRG")
+    link=$(expr "$ls" : '.*-> \(.*\)$')
     if expr "$link" : '/.*' > /dev/null; then
     PRG="$link"
     else
-    PRG=`dirname "$PRG"`"/$link"
+    PRG=$(dirname "$PRG")"/$link"
     fi
   done
 
-  ANT_HOME=`dirname "$PRG"`/..
+  ANT_HOME=$(dirname "$PRG")/..
 
   # make it fully qualified
-  ANT_HOME=`cd "$ANT_HOME" > /dev/null && pwd`
+  ANT_HOME=$(cd "$ANT_HOME" > /dev/null && pwd)
 fi
 
 # For Cygwin and Mingw, ensure paths are in UNIX format before
 # anything is touched
 if $cygwin ; then
   [ -n "$ANT_HOME" ] &&
-    ANT_HOME=`cygpath --unix "$ANT_HOME"`
+    ANT_HOME=$(cygpath --unix "$ANT_HOME")
   [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+    JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
 fi
 if $mingw ; then
   [ -n "$ANT_HOME" ] &&
-    ANT_HOME="`(cd "$ANT_HOME"; pwd)`"
+    ANT_HOME=$(cd "$ANT_HOME" > /dev/null && pwd)
   [ -n "$JAVA_HOME" ] &&
-    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+    JAVA_HOME=$(cd "$JAVA_HOME" > /dev/null && pwd)
 fi
 
 # set ANT_LIB location
@@ -167,7 +167,7 @@ if [ -z "$JAVACMD" ] ; then
       JAVACMD="$JAVA_HOME/bin/java"
     fi
   else
-    JAVACMD=`which java 2> /dev/null `
+    JAVACMD=$(which java 2> /dev/null)
     if [ -z "$JAVACMD" ] ; then
         JAVACMD=java
     fi
@@ -200,7 +200,7 @@ if $rpm_mode && [ -x /usr/bin/build-classpath ] ; then
         *.rpmsave) ;;
         *.rpmnew) ;;
         *)
-          for dep in `cat "$file"`; do
+          for dep in $(cat "$file"); do
             OPT_JAR_LIST="$OPT_JAR_LIST${OPT_JAR_LIST:+ }$dep"
           done
         esac
@@ -282,16 +282,16 @@ if $cygwin; then
   else
     format=windows
   fi
-  [ -n "$ANT_HOME" ] && ANT_HOME=`cygpath --$format "$ANT_HOME"`
-  ANT_LIB=`cygpath --$format "$ANT_LIB"`
-  [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --$format "$JAVA_HOME"`
-  LCP_TEMP=`cygpath --path --unix "$LOCALCLASSPATH"`
-  LOCALCLASSPATH=`cygpath --path --$format "$LCP_TEMP"`
+  [ -n "$ANT_HOME" ] && ANT_HOME=$(cygpath --$format "$ANT_HOME")
+  ANT_LIB=$(cygpath --$format "$ANT_LIB")
+  [ -n "$JAVA_HOME" ] && JAVA_HOME=$(cygpath --$format "$JAVA_HOME")
+  LCP_TEMP=$(cygpath --path --unix "$LOCALCLASSPATH")
+  LOCALCLASSPATH=$(cygpath --path --$format "$LCP_TEMP")
   if [ -n "$CLASSPATH" ] ; then
-    CP_TEMP=`cygpath --path --unix "$CLASSPATH"`
-    CLASSPATH=`cygpath --path --$format "$CP_TEMP"`
+    CP_TEMP=$(cygpath --path --unix "$CLASSPATH")
+    CLASSPATH=$(cygpath --path --$format "$CP_TEMP")
   fi
-  CYGHOME=`cygpath --$format "$HOME"`
+  CYGHOME=$(cygpath --$format "$HOME")
 fi
 
 # Show script help if requested


Mime
View raw message