update script tweaks

This commit is contained in:
Matthias Kretschmann 2020-03-13 17:32:23 +01:00
parent 77168b4b56
commit 379e08a2d1
Signed by: m
GPG Key ID: 606EEEF3C479A91F
2 changed files with 6 additions and 6 deletions

View File

@ -19,8 +19,8 @@
## Update Gitea ## Update Gitea
```bash ```bash
# run update script with sudo, passing version number as option # run update script, passing version number as option
sudo ./bin/update-gitea.sh 1.6.1 ./bin/update-gitea.sh 1.6.1
``` ```
Update script sets options by default, can be changed at top of script: Update script sets options by default, can be changed at top of script:

View File

@ -1,7 +1,7 @@
#!/bin/sh #!/bin/sh
# #
# usage, run with sudo: # usage, run with sudo:
# sudo ./update-gitea.sh 1.6.1 # ./update-gitea.sh 1.6.1
# #
set -e set -e
@ -24,12 +24,12 @@ echo "Downloading gitea-${version}-${arch}..."
wget -O "gitea-${version}-${arch}" "https://dl.gitea.io/gitea/${version}/gitea-${version}-${arch}" wget -O "gitea-${version}-${arch}" "https://dl.gitea.io/gitea/${version}/gitea-${version}-${arch}"
# copy new binary over old one # copy new binary over old one
cp "gitea-${version}-${arch}" $giteaBinary sudo cp "gitea-${version}-${arch}" $giteaBinary
echo "Updated Gitea binary v${version}." echo "Updated Gitea binary v${version}."
# set permissions # set permissions
chown $giteaUser:$giteaGroup $giteaBinary sudo chown $giteaUser:$giteaGroup $giteaBinary
chmod +x $giteaBinary sudo chmod +x $giteaBinary
echo "Set permissions." echo "Set permissions."
# start Gitea # start Gitea