Skip to content

Commit

Permalink
further work on SHA256
Browse files Browse the repository at this point in the history
  • Loading branch information
johnstonjs committed May 30, 2019
1 parent b4237d2 commit 3a5f0ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions gitea-update.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/sh
# A shell script to automatically update Gitea
# Depends only on basic shell utilities (curl, cut, find, grep, sed, wget)
# Depends only on basic shell utilities (curl, cut, find, grep, sed)
# Assumes use of systemd for Gitea start/stop


Expand Down Expand Up @@ -61,9 +61,9 @@ if [ $NEW_VER != $CUR_VER ]; then
fi
# Download the latest version of Gitea binary
#wget -N https://github.com/go-gitea/gitea/releases/download/v$NEW_VER/gitea-$NEW_VER-$ARCH -P $DIR/bin/
( cd $DIR/bin && curl -O -L $URL/v$NEW_VER/gitea-$NEW_VER-$ARCH )
( cd $DIR/bin && curl -s -O -L $URL/v$NEW_VER/gitea-$NEW_VER-$ARCH )
# Verify the checksum of the latest Gitea binary
SHA_CHECK=$(cd $DIR/bin && curl -L $URL/v$NEW_VER/gitea-$NEW_VER-$ARCH.sha256 | sha256sum -c | cut -d " " -f 2)
SHA_CHECK=$(cd $DIR/bin && curl -s -L $URL/v$NEW_VER/gitea-$NEW_VER-$ARCH.sha256 | sha256sum -c | cut -d " " -f 2)
if [ $SHA_CHECK = "OK" ]; then
if [ $DEBUG -eq 1 ]; then
echo "SHA256 verified"
Expand Down

0 comments on commit 3a5f0ae

Please sign in to comment.