Browse Source

Remove unused variables in shell scripts.

0.16
practicalswift 7 years ago
parent
commit
ab8e8b97a3
  1. 3
      contrib/devtools/git-subtree-check.sh
  2. 1
      contrib/gitian-build.sh
  3. 6
      contrib/verify-commits/verify-commits.sh
  4. 2
      contrib/verifybinaries/verify.sh

3
contrib/devtools/git-subtree-check.sh

@ -18,7 +18,7 @@ find_latest_squash()
sub= sub=
git log --grep="^git-subtree-dir: $dir/*\$" \ git log --grep="^git-subtree-dir: $dir/*\$" \
--pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" | --pretty=format:'START %H%n%s%n%n%b%nEND%n' "$COMMIT" |
while read a b junk; do while read a b _; do
case "$a" in case "$a" in
START) sq="$b" ;; START) sq="$b" ;;
git-subtree-mainline:) main="$b" ;; git-subtree-mainline:) main="$b" ;;
@ -48,7 +48,6 @@ if [ -z "$latest_squash" ]; then
fi fi
set $latest_squash set $latest_squash
old=$1
rev=$2 rev=$2
if [ "d$(git cat-file -t $rev 2>/dev/null)" != dcommit ]; then if [ "d$(git cat-file -t $rev 2>/dev/null)" != dcommit ]; then
echo "ERROR: subtree commit $rev unavailable. Fetch/update the subtree repository" >&2 echo "ERROR: subtree commit $rev unavailable. Fetch/update the subtree repository" >&2

1
contrib/gitian-build.sh

@ -6,7 +6,6 @@
sign=false sign=false
verify=false verify=false
build=false build=false
setupenv=false
# Systems to build # Systems to build
linux=true linux=true

6
contrib/verify-commits/verify-commits.sh

@ -12,8 +12,6 @@ VERIFIED_ROOT=$(cat "${DIR}/trusted-git-root")
VERIFIED_SHA512_ROOT=$(cat "${DIR}/trusted-sha512-root-commit") VERIFIED_SHA512_ROOT=$(cat "${DIR}/trusted-sha512-root-commit")
REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits") REVSIG_ALLOWED=$(cat "${DIR}/allow-revsig-commits")
HAVE_FAILED=false
HAVE_GNU_SHA512=1 HAVE_GNU_SHA512=1
[ ! -x "$(which sha512sum)" ] && HAVE_GNU_SHA512=0 [ ! -x "$(which sha512sum)" ] && HAVE_GNU_SHA512=0
@ -95,9 +93,9 @@ while true; do
FILE_HASHES="" FILE_HASHES=""
for FILE in $(git ls-tree --full-tree -r --name-only "$CURRENT_COMMIT" | LC_ALL=C sort); do for FILE in $(git ls-tree --full-tree -r --name-only "$CURRENT_COMMIT" | LC_ALL=C sort); do
if [ "$HAVE_GNU_SHA512" = 1 ]; then if [ "$HAVE_GNU_SHA512" = 1 ]; then
HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | sha512sum | { read FIRST OTHER; echo $FIRST; } ) HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | sha512sum | { read FIRST _; echo $FIRST; } )
else else
HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | shasum -a 512 | { read FIRST OTHER; echo $FIRST; } ) HASH=$(git cat-file blob "$CURRENT_COMMIT":"$FILE" | shasum -a 512 | { read FIRST _; echo $FIRST; } )
fi fi
[ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"' [ "$FILE_HASHES" != "" ] && FILE_HASHES="$FILE_HASHES"'
' '

2
contrib/verifybinaries/verify.sh

@ -76,8 +76,6 @@ if [ -n "$1" ]; then
BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSION/" BASEDIR="$BASEDIR$RCSUBDIR.$RCVERSION/"
fi fi
fi fi
SIGNATUREFILE="$BASEDIR$SIGNATUREFILENAME"
else else
echo "Error: need to specify a version on the command line" echo "Error: need to specify a version on the command line"
exit 2 exit 2

Loading…
Cancel
Save