added an update script to update tetanus for you!
This commit is contained in:
1 parent
f621a46954
commit
b30a62bb96
2 files changed
+21
No files matched your search
@@ -0,0 +1,20 @@
|
||||
#!/bin/bash
|
||||
current_version=$(cat ./version | grep version | cut -d " " -f 2)
|
||||
path=$(cat ./version | grep path | cut -d " " -f 2)
|
||||
version=$(curl https://git.pyro.monster/pyro/tetanus/releases/tag/latest | grep "<title>" | cut -d ">" -f 2 | cut -d " " -f 1)
|
||||
|
||||
if [[ "$version" == "$current_version" ]]; then
|
||||
echo "up to date"
|
||||
else
|
||||
echo "update needed"
|
||||
curl https://git.pyro.monster/pyro/tetanus/releases/download/latest/tetanus -o new_tetanus
|
||||
chmod +x ./new_tetanus
|
||||
if [ "$(stat -c '%u' $path)" -eq 0 ]; then
|
||||
sudo cp ./new_tetanus $path
|
||||
else
|
||||
cp ./new_tetanus $path
|
||||
fi
|
||||
echo "version: $version" > ./version
|
||||
echo "path: $path" >> ./version
|
||||
echo update complete!
|
||||
fi
|
||||
Reference in new issue
Block a user