ndimiduk commented on a change in pull request #2056:
URL: https://github.com/apache/hbase/pull/2056#discussion_r455181612



##########
File path: hbase-common/src/saveVersion.sh
##########
@@ -30,34 +30,34 @@ nativeOutputDirectory="$2/native/utils/"
 pushd .
 cd ..
 
-user=`whoami | sed -n -e 's/\\\/\\\\\\\\/p'`
+user=$(whoami | sed -n -e "s/\\\/\\\\\\\\/p")
 if [ "$user" == "" ]
 then
-  user=`whoami`
+  user=$(whoami)
 fi
-date=`date`
-cwd=`pwd`
+date=$(date)
+cwd=$(pwd)
 if [ -d .svn ]; then
-  revision=`(svn info | sed -n -e 's/Last Changed Rev: \(.*\)/\1/p') || true`
-  url=`(svn info | sed -n -e 's/^URL: \(.*\)/\1/p') || true`
+  revision=$( (svn info | sed -n -e "s/Last Changed Rev: \(.*\)/\1/p") || true)
+  url=$( (svn info | sed -n -e 's/^URL: \(.*\)/\1/p') || true)
 elif [ -d .git ]; then
-  revision=`git log -1 --no-show-signature --pretty=format:"%H" || true`
-  hostname=`hostname`
+  revision=$(git log -1 --no-show-signature --pretty=format:"%H" || true)
+  hostname=$(hostname)
   url="git://${hostname}${cwd}"
 fi
 if [ -z "${revision}" ]; then
   echo "[WARN] revision info is empty! either we're not in VCS or VCS commands 
failed." >&2
   revision="Unknown"
   url="file://$cwd"
 fi
-if ! [  -x "$(command -v openssl)" ]; then
+if ! [ -x "$(command -v openssl)" ]; then
   if ! [ -x "$(command -v gpg)" ]; then
     srcChecksum="Unknown"
   else
-    srcChecksum=`find hbase-*/src/main/ | grep -e "\.java" -e "\.proto" | 
LC_ALL=C sort | xargs gpg --print-md sha512 | gpg --print-md sha512 | cut -d ' 
' -f 1`
+    srcChecksum=$(find hbase-*/src/main/ | grep -e "\.java" -e "\.proto" | 
LC_ALL=C sort xargs gpg --print-md sha512 | gpg --print-md sha512 | tr '\n' ' ' 
| sed 's/[[:space:]]*//g')
   fi
 else
-  srcChecksum=`find hbase-*/src/main/ | grep -e "\.java" -e "\.proto" | 
LC_ALL=C sort | xargs openssl dgst -sha512 | openssl dgst -sha512 | cut -d ' ' 
-f 1`
+  srcChecksum=$(find hbase-*/src/main/ | grep -e "\.java" -e "\.proto" | 
LC_ALL=C sort xargs openssl dgst -sha512 | openssl dgst -sha512 | sed 's/^.* 
//')

Review comment:
       Oh, this is the example from your comment on JIRA, a difference between 
the mac and linux versions of `openssl dgst`. Disregard.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to