mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2025-02-01 07:25:53 +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
|
if [[ -d $BINDIR/$coin ]]; then
|
||||||
UPDATE=$($BINDIR/$coin/"$coind"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
UPDATE=$($BINDIR/$coin/"$coind"d --version | head -n 1 | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
|
||||||
fi
|
if [[ -z $UPDATE ]]; then
|
||||||
|
select+="$coin,"
|
||||||
if [[ -z $UPDATE ]]; then
|
list="${select%,}"
|
||||||
select+="$coin,"
|
fi
|
||||||
list="${select%,}"
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [[ -n $select ]]; then
|
if [[ -n $list ]]; then
|
||||||
|
withoutCoins=""
|
||||||
|
if [[ ! $list =~ "particl" ]]; then
|
||||||
|
withoutCoins="--withoutcoins=particl"
|
||||||
|
fi
|
||||||
echo "Updating $list"
|
echo "Updating $list"
|
||||||
. $SWAP_DATADIR/venv/bin/activate
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list
|
basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins=$list "${withoutCoins}"
|
||||||
else
|
else
|
||||||
echo "Coin Cores are up to date"
|
echo "Coin Cores are up to date"
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue