mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2025-01-03 09:29:39 +00:00
update: don't update cores unnecessarily
This commit is contained in:
parent
d665889123
commit
c31fb46387
1 changed files with 10 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue