|
@@ -0,0 +1,13 @@
|
|
|
|
+#!/bin/bash
|
|
|
|
+current_version=v`/gotosocial/gotosocial -v | cut -d ' ' -f 3`
|
|
|
|
+latest_version=`curl -s https://api.github.com/repos/superseriousbusiness/gotosocial/releases/latest | grep 'tag_name' | cut -d '"' -f 4`
|
|
|
|
+if [ "$current_version" != "$latest_version" ]; then
|
|
|
|
+ systemctl stop gotosocial.service
|
|
|
|
+ wget `curl -s https://api.github.com/repos/superseriousbusiness/gotosocial/releases/latest | grep 'browser_download_url.*linux_amd64' | cut -d '"' -f 4` -O /tmp/gotosocial.tar.gz
|
|
|
|
+ tar -xvzf /tmp/gotosocial.tar.gz -C /gotosocial
|
|
|
|
+ rm /tmp/gotosocial.tar.gz
|
|
|
|
+ # user permissions or whatever
|
|
|
|
+ systemctl start gotosocial.service
|
|
|
|
+else
|
|
|
|
+ echo "Up-to-date"
|
|
|
|
+fi
|