Cleanup
This commit is contained in:
parent
716eb31ba1
commit
d4425dd2c7
@ -1,23 +1,28 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# dodaj argument $1 za verzijo in spremenljivko za arch (a to lahko iz sistema potegne?)
|
|
||||||
|
|
||||||
# Create a bin dir under your gitea install folder
|
|
||||||
|
|
||||||
VERSION=1.4.2
|
VERSION=1.4.2
|
||||||
|
|
||||||
|
|
||||||
DIR=/opt/gitea
|
DIR=/opt/gitea
|
||||||
ARCH=linux-amd64
|
ARCH=linux-amd64
|
||||||
#darwin-10.6.386 darwin-10.6-amd64 linux-386 linux-arm-5,6,7,arm64,mips,mips64,mips64le
|
#darwin-10.6.386 darwin-10.6-amd64 linux-386 linux-arm-5,6,7,arm64,mips,mips64,mips64le
|
||||||
|
|
||||||
echo "Trying to download the newest version"
|
echo "Downloading the newest version..."
|
||||||
wget -N https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-$ARCH -P $DIR/bin/
|
wget -N https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-$ARCH -P $DIR/bin/
|
||||||
|
|
||||||
echo "Creating symlinks"
|
echo "Creating symlinks..."
|
||||||
ln -sfv $DIR/bin/gitea-$VERSION-$ARCH $DIR/gitea
|
ln -sfv $DIR/bin/gitea-$VERSION-$ARCH $DIR/gitea
|
||||||
|
|
||||||
echo "Fixing permissions"
|
echo "Fixing permissions..."
|
||||||
chmod -v +x $DIR/bin/gitea-$VERSION-$ARCH
|
chmod -v +x $DIR/bin/gitea-$VERSION-$ARCH
|
||||||
|
|
||||||
echo "Restarting service"
|
echo "Restarting service..."
|
||||||
service gitea restart
|
service gitea restart
|
||||||
service gitea status
|
service gitea status
|
||||||
|
|
||||||
|
# check if $DIR/bin exists otherwise create it
|
||||||
|
# try to download new version
|
||||||
|
# if you have the latest, break and exit
|
||||||
|
# else do other things
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user