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
@@ -158,6 +158,7 @@ async fn main() {
|
|||||||
banner.lines().for_each(|line| {
|
banner.lines().for_each(|line| {
|
||||||
appstate.output.push(line.to_string());
|
appstate.output.push(line.to_string());
|
||||||
});
|
});
|
||||||
|
|
||||||
let handles = Arc::new(Mutex::new(Vec::new()));
|
let handles = Arc::new(Mutex::new(Vec::new()));
|
||||||
let handles_clone = handles.clone();
|
let handles_clone = handles.clone();
|
||||||
let primary_handle = spawn(move || {
|
let primary_handle = spawn(move || {
|
||||||
|
|||||||
@@ -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