update_gotosocial.sh 482 B

1234567891011
  1. #!/bin/bash
  2. current_version=v`/gotosocial/gotosocial -v | cut -d ' ' -f 3`
  3. latest_version=`curl -s https://api.github.com/repos/superseriousbusiness/gotosocial/releases/latest | grep 'tag_name' | cut -d '"' -f 4`
  4. if [ "$current_version" != "$latest_version" ]; then
  5. systemctl stop gotosocial.service
  6. wget -qO- https://getbin.io/superseriousbusiness/gotosocial | tar xvz -C /gotosocial
  7. # user permissions or whatever
  8. systemctl start gotosocial.service
  9. else
  10. echo "Up-to-date"
  11. fi