HBASE-24710 Incorrect checksum calculation in saveVersion.sh (#2056)
Signed-off-by: Nick Dimiduk <ndimiduk@apache.org> Signed-off-by: Mingliang Liu <liuml07@apache.org>
This commit is contained in:
parent
f2c087caeb
commit
ea96743dd2
|
@ -30,19 +30,19 @@ 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
|
||||
|
@ -54,10 +54,10 @@ 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/^.* //')
|
||||
fi
|
||||
popd
|
||||
|
||||
|
|
Loading…
Reference in New Issue