gen_verify_stub 939 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. #!/bin/bash
  2. if [ "x$1" == "x" ]
  3. then
  4. echo "Usage: $0 <version> [email]"
  5. echo "Generate the tarball verification info suitable to put into an announcement."
  6. echo
  7. echo "Examples"
  8. echo " $0 7.0.0beta3"
  9. exit 0
  10. fi
  11. RELEASE_VER=$1
  12. GPG_USER=
  13. if [ "x$2" != "x" ]
  14. then
  15. GPG_USER=$2
  16. fi
  17. if test "x$PHPROOT" == "x"; then
  18. PHPROOT=.
  19. fi
  20. for TARBALL in "$PHPROOT/php-$RELEASE_VER.tar.bz2" "$PHPROOT/php-$RELEASE_VER.tar.gz" "$PHPROOT/php-$RELEASE_VER.tar.xz"
  21. do
  22. if ! [ -e $TARBALL ]
  23. then
  24. echo "$TARBALL doesn't exist"
  25. exit 3
  26. fi
  27. if [ "x$GPG_USER" == "x" ]
  28. then
  29. gpg --armor --detach-sign $TARBALL
  30. else
  31. gpg -u $GPG_USER --armor --detach-sign $TARBALL
  32. fi
  33. done
  34. for TARBALL in "$PHPROOT/php-$RELEASE_VER.tar.bz2" "$PHPROOT/php-$RELEASE_VER.tar.gz" "$PHPROOT/php-$RELEASE_VER.tar.xz"
  35. do
  36. basename $TARBALL
  37. echo "SHA256 hash: `sha256sum $TARBALL | cut -d' ' -f1`";
  38. echo PGP signature:
  39. cat $TARBALL.asc
  40. echo -e "\n"
  41. done
  42. exit 0