Added CT: Linkwarden
This commit is contained in:
13
CT-Files/linkwarden/Scripts/Update-monolith.sh
Normal file
13
CT-Files/linkwarden/Scripts/Update-monolith.sh
Normal file
@@ -0,0 +1,13 @@
|
||||
#!/bin/bash
|
||||
CurmonolithVersion=$(curl -s https://api.github.com/repos/Y2Z/monolith/releases/latest | grep 'tag_name.*' | cut -d : -f 2,3 | tr -d \" |tr -d , |tr -d " " |tr -d : )
|
||||
|
||||
if test "$CurmonolithVersion" = "$(cat /opt/monolith-Version)" ; then
|
||||
echo ' echo 'Updating Monolith'.sh up-to-date'
|
||||
exit
|
||||
else
|
||||
echo 'Updating Monolith'
|
||||
mv /opt/monolith-gnu-linux-x86_64 /opt/monolith-gnu-linux-x86_64.old
|
||||
curl -L -o /opt/monolith-gnu-linux-x86_64 https://github.com/Y2Z/monolith/releases/download/"$CurmonolithVersion"/monolith-gnu-linux-x86_64
|
||||
chmod +x /opt/monolith-gnu-linux-x86_64
|
||||
echo "$CurmonolithVersion" > /opt/monolith-Version
|
||||
fi
|
||||
Reference in New Issue
Block a user