#!/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 -qO- https://getbin.io/superseriousbusiness/gotosocial | tar xvz -C /gotosocial # user permissions or whatever systemctl start gotosocial.service else echo "Up-to-date" fi