From 663eb5985fab8bd7721471f83787aa38d254c051 Mon Sep 17 00:00:00 2001 From: akanealw Date: Wed, 28 Feb 2024 23:03:05 -0600 Subject: [PATCH] added update wrestic --- debian/debian-essentials.sh | 8 ++++---- wrestic/update-wrestic.sh | 6 +++++- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/debian/debian-essentials.sh b/debian/debian-essentials.sh index 291d33c..840ebdd 100755 --- a/debian/debian-essentials.sh +++ b/debian/debian-essentials.sh @@ -180,11 +180,11 @@ if [[ -f /etc/apt/keyrings/docker.gpg ]] echo "alias lzd='lazydocker'" >> /etc/bash.bashrc fi -# lazy docker install -if [[ -f /etc/apt/keyrings/docker.gpg ]] +# update wrestic +if [[ -f /usr/local/bin/wrestic ]] then - curl -s https://raw.githubusercontent.com/jesseduffield/lazydocker/master/scripts/install_update_linux.sh | bash - mv /root/.local/bin/lazydocker /usr/local/bin + curl -sL $(curl -s https://api.github.com/repos/alvaro17f/wrestic/releases/latest | grep browser_download_url | cut -d '"' -f 4) | sudo tar zxf - -C /usr/local/bin --overwrite + sudo chown akanealw:akanealw /usr/local/bin/wrestic fi # create tmux config diff --git a/wrestic/update-wrestic.sh b/wrestic/update-wrestic.sh index fa9dbdb..0263300 100755 --- a/wrestic/update-wrestic.sh +++ b/wrestic/update-wrestic.sh @@ -1,3 +1,7 @@ #!/bin/bash -curl -sL $(curl -s https://api.github.com/repos/alvaro17f/wrestic/releases/latest | grep browser_download_url | cut -d '"' -f 4) | sudo tar zxf - -C /usr/local/bin --overwrite +if [[ -f /usr/local/bin/wrestic ]] + then + curl -sL $(curl -s https://api.github.com/repos/alvaro17f/wrestic/releases/latest | grep browser_download_url | cut -d '"' -f 4) | sudo tar zxf - -C /usr/local/bin --overwrite + sudo chown akanealw:akanealw /usr/local/bin/wrestic +fi