update cores

This commit is contained in:
nahuhh 2024-09-16 00:14:47 +00:00
parent e9a84cf72f
commit 4d46146657
3 changed files with 109 additions and 7 deletions

85
bsx/auto_coinupd8.sh Executable file
View file

@ -0,0 +1,85 @@
#!/bin/bash
#set -x
SWAP_DATADIR=$HOME/coinswaps
echo "Checking for Coin updates" && sleep 1
if [[ -d $SWAP_DATADIR/bin/bitcoin ]]; then
BTC=$($SWAP_DATADIR/bin/bitcoin/bitcoind --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $BTC ]]; then
echo "Updating Bitcoin"
Bitcoin="bitcoin,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/dash ]]; then
DASH=$($SWAP_DATADIR/bin/dash/dashd --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $DASH ]]; then
echo "Updating Dash"
Dash="dash,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/decred ]]; then
DCR=$($SWAP_DATADIR/bin/decred/dcrd --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $DCR ]]; then
echo "Updating Decred"
Decred="decred,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/firo ]]; then
FIRO=$($SWAP_DATADIR/bin/firo/firod --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $FIRO ]]; then
echo "Updating Firo"
Firo="firo,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/litecoin ]]; then
LTC=$($SWAP_DATADIR/bin/litecoin/litecoind --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $LTC ]]; then
echo "Updating Litecoin"
Litecoin="litecoin,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/particl ]]; then
PART=$($SWAP_DATADIR/bin/particl/particld --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $PART ]]; then
echo "Updating Particl"
fi
fi
if [[ -d $SWAP_DATADIR/bin/pivx ]]; then
PIVX=$($SWAP_DATADIR/bin/pivx/pivxd --version | grep version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $PIVX ]]; then
echo "Updating PIVX"
Pivx="pivx,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/monero ]]; then
XMR=$($SWAP_DATADIR/bin/monero/monerod --version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $XMR ]]; then
echo "Updating Monero"
Monero="monero,"
fi
fi
if [[ -d $SWAP_DATADIR/bin/wownero ]]; then
WOW=$($SWAP_DATADIR/bin/wownero/wownerod --version | grep -Fxf $SWAP_DATADIR/basicswap/core_versions)
if [[ -z $WOW ]]; then
echo "Updating Wownero"
Wownero="wownero,"
fi
fi
sleep 1
if [[ -n $Bitcoin ]] || [[ -n $Dash ]] || [[ -n $Decred ]] || [[ -n $Firo ]] || [[ -n $Litecoin ]] || [[ -n $Particl ]] || [[ -n $Pivx ]] || [[ -n $Monero ]] || [[ -n $Wownero ]]; then
. $SWAP_DATADIR/venv/bin/activate
basicswap-prepare --datadir=$SWAP_DATADIR --preparebinonly --withcoins="$Bitcoin$Dash$Decred$Firo$Litecoin$Pivx$Monero$Wownero"particl
else
echo "Coin Cores are up to date"
fi

View file

@ -5,21 +5,29 @@ cd $SWAP_DATADIR/basicswap
echo "Updating basicswap-bash scripts" && sleep 1
git clone https://github.com/nahuhh/basicswap-bash -b dev
cd basicswap-bash
# Move scripts
rm -rf $HOME/.local/bin/bsx
mv -f basic* bsx* $HOME/.local/bin/
# Cleanup install
cd $SWAP_DATADIR/basicswap
rm -rf basicswap-bash
# Copy core_versions to basicswap folder
mv core_versions $SWAP_DATADIR/basicswap/core_versions
echo "Updating BasicSwapDEX" && sleep 1
# Delete dangling build folder. Same as --no-cache for docker
rm -rf $SWAP_DATADIR/basicswap/build
# Switch to new repo: basicswap/basicswap
cd $SWAP_DATADIR/basicswap
git remote set-url origin https://github.com/basicswap/basicswap
# Fix conflicts from force-pushes and rebase
git checkout master
# Pull repo
# git checkout master
git pull
# Install
# Update BasicSwap
$SWAP_DATADIR/venv/bin/pip install .
# Update Coin Cores
$HOME/.local/bin/bsx/auto_coinupd8.sh
# Cleanup
rm -rf basicswap-bash core_versions

9
core_versions Normal file
View file

@ -0,0 +1,9 @@
Bitcoin Core version v26.0.0
dcrd version 1.8.1+release (Go version go1.21.1 linux/amd64)
Dash Core version v20.0.2
Firo Core Daemon version v0.14.14.0-ge0c423805
Litecoin Core version v0.21.3
Particl Core version v23.2.7.0
PIVX Core Daemon version v5.6.1.0-af60f19642
Monero 'Fluorine Fermi' (v0.18.3.4-release)
Wownero 'Kunty Karen' (v0.11.1.0-release)