basicswap-bash/bsx/update.sh

47 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/bash
2024-10-03 03:30:32 +00:00
COINCURVE=0.2
cd $SWAP_DATADIR/basicswap
2024-06-04 02:20:34 +00:00
# Download updated scripts
echo "Updating basicswap-bash scripts" && sleep 1
2024-09-16 20:58:53 +00:00
git clone https://github.com/nahuhh/basicswap-bash
2024-06-04 02:20:34 +00:00
cd basicswap-bash
2024-09-16 00:14:47 +00:00
2024-06-04 02:20:34 +00:00
# Move scripts
2024-06-05 18:36:36 +00:00
rm -rf $HOME/.local/bin/bsx
mv -f basic* bsx* $HOME/.local/bin/
2024-09-16 00:14:47 +00:00
# Copy core_versions to basicswap folder
mv core_versions $SWAP_DATADIR/basicswap/core_versions
2024-06-04 02:20:34 +00:00
echo "Updating BasicSwapDEX" && sleep 1
# Delete dangling build folder. Same as --no-cache for docker
2024-06-07 00:23:03 +00:00
rm -rf $SWAP_DATADIR/basicswap/build
2024-09-16 00:14:47 +00:00
2024-10-03 03:30:32 +00:00
# Coincurve
cd $SWAP_DATADIR
if [[ -d coincurve-basicswap ]]; then
cd coincurve-basicswap
git pull
git checkout basicswap_v$COINCURVE
else
git clone https://github.com/basicswap/coincurve -b basicswap_v$COINCURVE coincurve-basicswap && cd $_
fi
$SWAP_DATADIR/venv/bin/pip install .
# BasicSwap
2024-06-07 00:23:03 +00:00
# Switch to new repo: basicswap/basicswap
2024-09-16 00:14:47 +00:00
cd $SWAP_DATADIR/basicswap
2024-06-07 00:23:03 +00:00
git remote set-url origin https://github.com/basicswap/basicswap
2024-09-16 00:14:47 +00:00
# git checkout master
git pull
2024-09-16 00:14:47 +00:00
# Update BasicSwap
2024-02-25 13:28:40 +00:00
$SWAP_DATADIR/venv/bin/pip install .
2024-09-16 00:14:47 +00:00
# Update Coin Cores
$HOME/.local/bin/bsx/auto_coinupd8.sh
# Cleanup
2024-09-20 22:09:54 +00:00
rm -rf basicswap-bash