Created
September 3, 2021 05:14
-
-
Save dvandonkelaar/42e6cacc0b7147c40394827cf16b3ad3 to your computer and use it in GitHub Desktop.
Update Gitea installation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [[ "$OSTYPE" != "linux-gnu"* ]]; then | |
echo Only Linux is supported! | |
exit | |
fi | |
arch="" | |
case $(uname -m) in | |
i386) arch="386" ;; | |
i686) arch="386" ;; | |
x86_64) arch="amd64" ;; | |
arm) dpkg --print-architecture | grep -q "arm64" && arch="arm64" || arch="arm64" ;; | |
esac | |
if [[ $arch != "386" && $arch != "amd64" && $arch != "arm-5" && $arch != "arm-6" && $arch != "arm64" ]]; then | |
echo "Architecture '$arch' is not supported!" | |
exit | |
fi | |
echo Please enter Gitea version: | |
read version | |
echo | |
echo Updating to version $version... | |
systemctl stop gitea | |
wget -O /usr/local/bin/gitea https://dl.gitea.io/gitea/$version/gitea-$version-linux-$arch | |
systemctl start gitea |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment