mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2024-12-22 11:39:21 +00:00
Compare commits
3 commits
d7e379d89b
...
4d46146657
Author | SHA1 | Date | |
---|---|---|---|
|
4d46146657 | ||
|
e9a84cf72f | ||
|
1531ba9034 |
6 changed files with 119 additions and 10 deletions
|
@ -4,14 +4,14 @@ BasicSwapDEX on Windows(WSL)/Debian/Ubuntu/Arch/Fedora
|
|||
|
||||
### New Installation
|
||||
```bash
|
||||
git clone https://github.com/nahuhh/basicswap-bash -b dev
|
||||
git clone https://github.com/nahuhh/basicswap-bash
|
||||
cd basicswap-bash && ./install.sh
|
||||
cd .. && rm -rf basicswap-bash
|
||||
```
|
||||
### Update scripts from older versions
|
||||
``` bash
|
||||
cd ~/coinswaps/basicswap
|
||||
git clone https://github.com/nahuhh/basicswap-bash -b dev
|
||||
git clone https://github.com/nahuhh/basicswap-bash
|
||||
cd basicswap-bash
|
||||
mkdir -p $HOME/.local/bin
|
||||
rm -r $HOME/.local/bin/bsx
|
||||
|
|
85
bsx/auto_coinupd8.sh
Executable file
85
bsx/auto_coinupd8.sh
Executable 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
|
|
@ -15,7 +15,7 @@ $SWAP_DATADIR/venv/bin/pip install .
|
|||
|
||||
## Clone basicswap git
|
||||
cd $SWAP_DATADIR
|
||||
git clone https://github.com/basicswap/basicswap -b dev
|
||||
git clone https://github.com/basicswap/basicswap
|
||||
cd $SWAP_DATADIR/basicswap
|
||||
## Install basicswap
|
||||
$SWAP_DATADIR/venv/bin/pip install .
|
||||
|
|
|
@ -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 reset HEAD~50 --hard
|
||||
# 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
9
core_versions
Normal 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)
|
|
@ -61,6 +61,7 @@ detect_os_arch() {
|
|||
fi
|
||||
}
|
||||
|
||||
|
||||
detect_os_arch
|
||||
|
||||
## Update & Install dependencies
|
||||
|
@ -172,6 +173,12 @@ if [ -d $HOME/.local/bin/bsx ]; then
|
|||
rm -r $HOME/.local/bin/bsx* $HOME/.local/bin/basicswap-bash
|
||||
fi
|
||||
mv -f -t $HOME/.local/bin/ basicswap-bash bsx*
|
||||
# Enable .profile detection on XFCE
|
||||
xfce_check=$(echo $XDG_CURRENT_DESKTOP | grep XFCE)
|
||||
xsessionrc_check=$(cat ~/.xsessionrc | grep '. ~/.profile')
|
||||
if [[ $xfce_chek ]] && [[ -z $xsessionrc_check ]]; then
|
||||
echo '. ~/.profile' | tee -a ~/.xsessionrc
|
||||
fi
|
||||
|
||||
## Make venv and set variables for install
|
||||
export SWAP_DATADIR=$HOME/coinswaps
|
||||
|
|
Loading…
Reference in a new issue