mirror of
https://github.com/apache/lucene.git
synced 2025-02-21 01:18:45 +00:00
if a system doesn't have sha1sum, fall back and try shasum
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1571838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
c0cc5946b5
commit
2163160ad4
@ -36,6 +36,17 @@ if [ $# -lt 2 ] || [ 3 -lt $# ] ; then
|
||||
exit 1;
|
||||
fi
|
||||
|
||||
sha_sum() {
|
||||
if hash sha1sum 2>/dev/null; then
|
||||
sha1sum "$@"
|
||||
elif hash shasum 2>/dev/null; then
|
||||
shasum "$@"
|
||||
else
|
||||
echo "Can't find sha1sum or shasum, aborting"
|
||||
exit 1;
|
||||
fi
|
||||
}
|
||||
|
||||
SRC_FILE=$1
|
||||
VER_RC=$2
|
||||
GPG_ID_ARG=""
|
||||
@ -79,6 +90,6 @@ set -x
|
||||
mkdir $DIR || exit 1
|
||||
mv $SRC_FILE $DIR/$PDF || exit 1
|
||||
cd $DIR || exit 1
|
||||
sha1sum $PDF > $SHA || exit 1
|
||||
sha_sum $PDF > $SHA || exit 1
|
||||
gpg $GPG_ID_ARG --armor --output $GPG --detach-sig $PDF|| exit 1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user