#!/bin/bash set -e export XDG_RUNTIME_DIR=/run/user/$UID release=`curl -L https://api.github.com/repos/matrix-org/sliding-sync/releases/latest -s | jq -r '.tag_name'` echo ">>> stopping to avoid binary being busy" echo systemctl stop --user syncv3 wget --show-progress -q -O $HOME/bin/syncv3 https://github.com/matrix-org/sliding-sync/releases/download/$release/syncv3_linux_amd64 echo echo ">>> starting...." systemctl start --user syncv3 sleep 2 systemctl status --user syncv3