From c31fb463877daceb7492ade1971bae4ef4800b8f Mon Sep 17 00:00:00 2001 From: nahuhh <50635951+nahuhh@users.noreply.github.com> Date: Fri, 27 Dec 2024 00:21:09 +0000 Subject: [PATCH] update: don't update cores unnecessarily --- bsx/auto_coinupd8.sh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/bsx/auto_coinupd8.sh b/bsx/auto_coinupd8.sh index ec04fd3..b5ae212 100755 --- a/bsx/auto_coinupd8.sh +++ b/bsx/auto_coinupd8.sh @@ -34,18 +34,21 @@ for coin in "${chain[@]}"; do if [[ -d $BINDIR/$coin ]]; then UPDATE=$($BINDIR/$coin/"$coind"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions) - fi - - if [[ -z $UPDATE ]]; then - select+="$coin," - list="${select%,}" + if [[ -z $UPDATE ]]; then + select+="$coin," + list="${select%,}" + fi fi done -if [[ -n $select ]]; then +if [[ -n $list ]]; then + withoutCoins="" + if [[ ! $list =~ "particl" ]]; then + withoutCoins="--withoutcoins=particl" + fi echo "Updating $list" . $SWAP_DATADIR/venv/bin/activate - basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list + basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list "${withoutCoins}" else echo "Coin Cores are up to date" fi