23 lines
620 B
Bash
23 lines
620 B
Bash
|
#!/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*
|