basicswap-bash/bsx/addcoin.sh

28 lines
824 B
Bash
Raw Normal View History

#!/bin/bash
## Prompt for user input
2024-02-25 13:28:40 +00:00
echo -e "\n\nThe following coins can be added (case sensitive)\nbitcoin\ndash\nfiro\nlitecoin\npivx\n"
read -p 'Full name of coin to add [example: litecoin] ' addcoin
## Confirm
echo -e "\nAdd $addcoin to your BasicSwap install, correct? Press any key to continue. CTRL-C to exit"
read
## 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