update: pull if baasicswap-bash repo exists

This commit is contained in:
nahuhh 2024-12-27 00:28:37 +00:00
parent c31fb46387
commit 4b52312f8f

View file

@ -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