hs.scripts/updates/synapse-admin.sh

23 lines
620 B
Bash
Raw Normal View History

2024-04-25 13:49:12 +02:00
#!/bin/bash
set -e
release=`curl -Ls https://api.github.com/repos/Awesome-Technologies/synapse-admin/releases/latest | jq -r '.tag_name'`
# warning: unarchives all the files without the usual parent dir!
workdir=/tmp/$USER-synapseadmin
target= #$HOME/synapse-admin
if [ -z ${target+x} ];
then
echo "target appears to be unset"
exit 1
fi
mkdir -p $workdir
cd $workdir
wget https://github.com/Awesome-Technologies/synapse-admin/releases/download/$release/synapse-admin-$release.tar.gz
tar -xf synapse-admin-$release.tar.gz
rsync -aAX --delete $workdir/synapse-admin-$release/ $target/
rm -r synapse-admin-$release*