basicswap-bash/bsx/addcoin.sh

28 lines
839 B
Bash
Raw Permalink Normal View History

#!/bin/bash
## Prompt for user input
2024-11-09 03:03:53 +00:00
printf "\n\nThe following coins can be added (case sensitive)\nbitcoin\ndash\ndecred\nfiro\nlitecoin\npivx\nwownero\n\n"
read -p 'Full name of coin to add [example: litecoin] ' addcoin
## Confirm
2024-06-04 02:20:34 +00:00
read -p $'\nAdd '$addcoin' to your BasicSwap install, correct? Press ENTER to continue. CTRL-C to exit'
## Add the coin
if [ $addcoin = bitcoin ]; then
read -p 'Use --usebtcfastsync for bitcoin? [Y/n] ' btcfastsync
case $btcfastsync in
n | N) confirmed=no;;
*) confirmed=yes;;
esac
if [ $confirmed = yes ]; then
2024-02-12 22:57:48 +00:00
echo "Using btcfastsync"
2024-02-24 16:24:07 +00:00
basicswap-prepare --usebtcfastsync --datadir=$SWAP_DATADIR --addcoin=$addcoin
else
2024-02-12 22:57:48 +00:00
echo "Not using btcfastsync"
2024-02-24 16:24:07 +00:00
basicswap-prepare --datadir=$SWAP_DATADIR --addcoin=$addcoin
fi
else
2024-02-24 16:24:07 +00:00
basicswap-prepare --datadir=$SWAP_DATADIR --addcoin=$addcoin
fi