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