From 4b52312f8f786f80c2397e979255e5048f0c89f9 Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Fri, 27 Dec 2024 00:28:37 +0000 Subject: [PATCH] update: pull if baasicswap-bash repo exists --- bsx-update | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bsx-update b/bsx-update index 42a7425..f7b4df2 100755 --- a/bsx-update +++ b/bsx-update @@ -32,8 +32,13 @@ else # Download updated scripts echo "Updating basicswap-bash scripts" && sleep 1 - git clone https://github.com/nahuhh/basicswap-bash || { $red"Failed to clone repo. Cancelling update."; exit; } - cd basicswap-bash + if [[ -d basicswap-bash ]]; then + cd basicswap-bash + git pull || { $red"Failed to clone repo. Cancelling update.\n"; exit; } + else + git clone https://github.com/nahuhh/basicswap-bash || { $red"Failed to clone repo. Cancelling update.\n"; exit; } + cd basicswap-bash + fi # Move scripts rm -rf $HOME/.local/bin/bsx