mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2025-01-05 10:29:31 +00:00
Compare commits
5 commits
9991176e0e
...
76e52e8863
Author | SHA1 | Date | |
---|---|---|---|
|
76e52e8863 | ||
|
e71e4688c0 | ||
|
b226e74fe9 | ||
|
4364fa99cc | ||
|
6d2ab45cbd |
9 changed files with 26 additions and 38 deletions
|
@ -24,7 +24,7 @@ bsx-update
|
||||||
```
|
```
|
||||||
basicswap-bash
|
basicswap-bash
|
||||||
```
|
```
|
||||||
#### Update BSX core
|
#### Update BSX core and Coin cores
|
||||||
```
|
```
|
||||||
bsx-update
|
bsx-update
|
||||||
```
|
```
|
||||||
|
@ -45,11 +45,6 @@ bsx-addcoin
|
||||||
bsx-removecoin
|
bsx-removecoin
|
||||||
```
|
```
|
||||||
|
|
||||||
#### Update blockchains
|
|
||||||
```
|
|
||||||
bsx-upgrade-coins
|
|
||||||
```
|
|
||||||
|
|
||||||
|
|
||||||
A small donation goes a long way. Thanks
|
A small donation goes a long way. Thanks
|
||||||
- ofrnxmr
|
- ofrnxmr
|
||||||
|
|
|
@ -42,5 +42,5 @@ read -p 'Select an option [1|2]: ' l
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
$HOME/.local/bin/bsx/addcoin.sh
|
$HOME/.local/bin/bsx/addcoin.sh
|
||||||
|
|
|
@ -42,5 +42,5 @@ read -p 'Select an option [1|2]: ' l
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
$HOME/.local/bin/bsx/disabletor.sh
|
$HOME/.local/bin/bsx/disabletor.sh
|
||||||
|
|
|
@ -42,5 +42,5 @@ read -p 'Select an option [1|2]: ' l
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
$HOME/.local/bin/bsx/enabletor.sh
|
$HOME/.local/bin/bsx/enabletor.sh
|
||||||
|
|
|
@ -42,5 +42,5 @@ read -p 'Select an option [1|2]: ' l
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
$HOME/.local/bin/bsx/removecoin.sh
|
$HOME/.local/bin/bsx/removecoin.sh
|
||||||
|
|
|
@ -18,7 +18,7 @@ if [[ -f $SWAP_DATADIR/particl/particl.pid ]]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
. $SWAP_DATADIR/venv/bin/activate && python -V
|
. $SWAP_DATADIR/venv/bin/activate
|
||||||
|
|
||||||
if [ -f /usr/local/bin/bsx/update.sh ]; then
|
if [ -f /usr/local/bin/bsx/update.sh ]; then
|
||||||
/usr/local/bin/bsx/update.sh
|
/usr/local/bin/bsx/update.sh
|
||||||
|
|
12
bsx/setup.sh
12
bsx/setup.sh
|
@ -5,22 +5,18 @@ red="echo -e -n \e[31;1m"
|
||||||
green="echo -e -n \e[32;1m"
|
green="echo -e -n \e[32;1m"
|
||||||
nocolor="echo -e -n \e[0m"
|
nocolor="echo -e -n \e[0m"
|
||||||
|
|
||||||
## Download & Install coincurve stuff
|
|
||||||
cd $SWAP_DATADIR
|
|
||||||
git clone https://github.com/basicswap/coincurve -b basicswap_v0.2 coincurve-basicswap
|
|
||||||
cd $SWAP_DATADIR/coincurve-basicswap
|
|
||||||
$SWAP_DATADIR/venv/bin/pip install .
|
|
||||||
|
|
||||||
## Clone basicswap git
|
## Clone basicswap git
|
||||||
cd $SWAP_DATADIR
|
cd $SWAP_DATADIR
|
||||||
git clone https://github.com/basicswap/basicswap
|
git clone https://github.com/basicswap/basicswap
|
||||||
cd $SWAP_DATADIR/basicswap
|
cd $SWAP_DATADIR/basicswap
|
||||||
|
|
||||||
## Macos
|
## Macos
|
||||||
if [[ $MACOS ]]; then
|
if [[ $MACOS ]]; then
|
||||||
$SWAP_DATADIR/venv/bin/pip install certifi
|
$SWAP_DATADIR/venv/bin/pip install certifi
|
||||||
fi
|
fi
|
||||||
## Install basicswap
|
|
||||||
$SWAP_DATADIR/venv/bin/pip install wheel
|
## Install basicswap, coincurve, and pip dependencies
|
||||||
|
$SWAP_DATADIR/venv/bin/pip install -r requirements.txt --require-hashes
|
||||||
$SWAP_DATADIR/venv/bin/pip install .
|
$SWAP_DATADIR/venv/bin/pip install .
|
||||||
|
|
||||||
## Decide a source for Monero's restore height
|
## Decide a source for Monero's restore height
|
||||||
|
|
|
@ -1,29 +1,22 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
COINCURVE=0.2
|
|
||||||
|
|
||||||
echo "Updating BasicSwapDEX" && sleep 1
|
echo "Updating BasicSwapDEX" && sleep 1
|
||||||
# Delete dangling build folder. Same as --no-cache for docker
|
# Delete dangling build folder. Same as --no-cache for docker
|
||||||
rm -rf $SWAP_DATADIR/basicswap/build
|
rm -rf $SWAP_DATADIR/basicswap/build
|
||||||
|
|
||||||
# Coincurve
|
# BasicSwap, coincurve, and dependencies
|
||||||
cd $SWAP_DATADIR
|
|
||||||
if [[ -d coincurve-basicswap ]]; then
|
|
||||||
cd coincurve-basicswap
|
|
||||||
git fetch
|
|
||||||
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
|
|
||||||
# Switch to new repo: basicswap/basicswap
|
# Switch to new repo: basicswap/basicswap
|
||||||
cd $SWAP_DATADIR/basicswap
|
cd $SWAP_DATADIR/basicswap
|
||||||
git remote set-url origin https://github.com/basicswap/basicswap
|
git remote set-url origin https://github.com/basicswap/basicswap
|
||||||
# git checkout master
|
|
||||||
git pull
|
|
||||||
|
|
||||||
# Update BasicSwap
|
# Conflicting messages_pb2.py from v0.12.7
|
||||||
|
if [[ -f basicswap/messages_pb2.py ]]; then
|
||||||
|
git restore basicswap/messages_pb2.py
|
||||||
|
fi
|
||||||
|
|
||||||
|
#git checkout master
|
||||||
|
git pull
|
||||||
|
$SWAP_DATADIR/venv/bin/pip install -r requirements.txt --require-hashes
|
||||||
$SWAP_DATADIR/venv/bin/pip install .
|
$SWAP_DATADIR/venv/bin/pip install .
|
||||||
|
|
||||||
# Update Coin Cores
|
# Update Coin Cores
|
||||||
|
|
10
install.sh
10
install.sh
|
@ -50,7 +50,7 @@ detect_os_arch() {
|
||||||
# Debian / Ubuntu / Mint
|
# Debian / Ubuntu / Mint
|
||||||
INSTALL="sudo apt install"
|
INSTALL="sudo apt install"
|
||||||
UPDATE="sudo apt update"
|
UPDATE="sudo apt update"
|
||||||
DEPENDENCY="python-is-python3 python3-pip python3-venv gnupg pkg-config"
|
DEPENDENCY="python3-pip python3-venv gnupg pkg-config"
|
||||||
elif type -P dnf > /dev/null; then
|
elif type -P dnf > /dev/null; then
|
||||||
# Fedora
|
# Fedora
|
||||||
INSTALL="sudo dnf install"
|
INSTALL="sudo dnf install"
|
||||||
|
@ -184,9 +184,13 @@ read -p 'Press Enter to continue, or CTRL-C to exit.'
|
||||||
|
|
||||||
# Quest to make trasher happy
|
# Quest to make trasher happy
|
||||||
addpath='PATH="$HOME/.local/bin:$PATH"'
|
addpath='PATH="$HOME/.local/bin:$PATH"'
|
||||||
trasherdk=$(echo $PATH | grep .local/bin)
|
trasherdk=$(echo $PATH | grep -F '.local/bin')
|
||||||
if ! [[ $trasherdk ]]; then
|
|
||||||
|
if [[ ! -d $HOME/.local/bin ]]; then
|
||||||
mkdir -p $HOME/.local/bin
|
mkdir -p $HOME/.local/bin
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [[ -z $trasherdk ]]; then
|
||||||
|
|
||||||
# Bash
|
# Bash
|
||||||
if [[ -f $HOME/.bashrc ]]; then
|
if [[ -f $HOME/.bashrc ]]; then
|
||||||
|
|
Loading…
Reference in a new issue