Checking if the requested version is already downloaded.
This commit is contained in:
parent
d4425dd2c7
commit
4e6afd5fc1
@ -8,6 +8,13 @@ DIR=/opt/gitea
|
||||
ARCH=linux-amd64
|
||||
#darwin-10.6.386 darwin-10.6-amd64 linux-386 linux-arm-5,6,7,arm64,mips,mips64,mips64le
|
||||
|
||||
|
||||
if [ -f $DIR/bin/gitea-$VERSION-$ARCH ]; then
|
||||
|
||||
echo "Latest version is already downloaded!"
|
||||
|
||||
else
|
||||
|
||||
echo "Downloading the newest version..."
|
||||
wget -N https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-$ARCH -P $DIR/bin/
|
||||
|
||||
@ -19,10 +26,10 @@ chmod -v +x $DIR/bin/gitea-$VERSION-$ARCH
|
||||
|
||||
echo "Restarting service..."
|
||||
service gitea restart
|
||||
|
||||
|
||||
|
||||
fi
|
||||
|
||||
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