From 3b10933fd0f488c1ed9726f897d5667a9010b221 Mon Sep 17 00:00:00 2001 From: b4d Date: Tue, 5 Jun 2018 07:59:43 +0200 Subject: [PATCH] First commit --- README.md | 0 gitea-update.sh | 23 +++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 README.md create mode 100755 gitea-update.sh diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/gitea-update.sh b/gitea-update.sh new file mode 100755 index 0000000..32c59af --- /dev/null +++ b/gitea-update.sh @@ -0,0 +1,23 @@ +#!/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 +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 + +echo "Trying to download the newest version" +wget -N https://dl.gitea.io/gitea/$VERSION/gitea-$VERSION-$ARCH -P $DIR/bin/ + +echo "Creating symlinks" +ln -sfv $DIR/bin/gitea-$VERSION-$ARCH $DIR/gitea + +echo "Fixing permissions" +chmod -v +x $DIR/bin/gitea-$VERSION-$ARCH + +echo "Restarting service" +service gitea restart +service gitea status