Update to check for ARM or x86 and install the correct version.

This commit is contained in:
Josh Mudge 2018-06-23 21:57:23 -06:00
parent 99f7a27ea2
commit eb8dfc1af3
1 changed files with 11 additions and 1 deletions

View File

@ -14,7 +14,17 @@ sudo mkdir -p /opt/gitea/ /var/log/gitea
sudo chown -R gitea:gitea /opt/gitea/ /var/log/gitea sudo chown -R gitea:gitea /opt/gitea/ /var/log/gitea
# Download and install gitea # Download and install gitea
sudo wget -O "/opt/gitea/gitea-$VER" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
# Check if architecure is x86 and download Gitea
if [ -n "$(uname -a | grep x86_64)" ]; then
sudo wget -O "/opt/gitea/gitea-$VER" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
fi
# Check if architecure is ARMv7 and download Gitea
if [ -n "$(uname -a | grep armv7l)" ]; then
sudo wget -O "/opt/gitea/gitea-$VER" "https://dl.gitea.io/gitea/$VER/gitea-$VER-linux-arm-7"
fi
sudo chmod +x /opt/gitea/gitea-$VER sudo chmod +x /opt/gitea/gitea-$VER
rm -f /opt/gitea/gitea rm -f /opt/gitea/gitea
ln -sf gitea-$VER /opt/gitea/gitea ln -sf gitea-$VER /opt/gitea/gitea