add/remove: allow variable

This commit is contained in:
nahuhh 2025-01-12 19:56:48 +00:00
parent 3d51d62b49
commit 954e293043
4 changed files with 13 additions and 4 deletions

View file

@ -45,5 +45,6 @@ read -p 'Select an option [1|2]: ' l
esac
done
export addcoin="$1"
. $SWAP_DATADIR/venv/bin/activate
$HOME/.local/bin/bsx/addcoin.sh

View file

@ -45,5 +45,6 @@ read -p 'Select an option [1|2]: ' l
esac
done
export disablecoin="$1"
. $SWAP_DATADIR/venv/bin/activate
$HOME/.local/bin/bsx/removecoin.sh

View file

@ -1,8 +1,11 @@
#!/bin/bash
## Prompt for user input
printf "\n\nThe following coins can be added (case sensitive)\nbitcoin\nbitcoincash\ndash\ndecred\nfiro\nlitecoin\npivx\nwownero\n\n"
read -p 'Full name of coin to add [example: litecoin] ' addcoin
if [[ -z $addcoin ]]; then
printf "\n\nThe following coins can be added (case sensitive)\nbitcoin\nbitcoincash\ndash\ndecred\ndogecoin\nfiro\nlitecoin\npivx\nwownero\n\n"
read -p 'Full name of coin to add [example: litecoin] ' addcoin
fi
## Confirm
read -p $'\nAdd '$addcoin' to your BasicSwap install, correct? Press ENTER to continue. CTRL-C to exit'

View file

@ -1,10 +1,14 @@
#!/bin/bash
## Prompt for user input
printf "\n\nThe following coins can be disabled (case sensitive)\nbitcoin\nbitcoincash\ndash\ndecred\nfiro\nlitecoin\nmonero\npivx\nwownero\n\n"
read -p 'Full name of coin to disable [example: wownero] ' disablecoin
if [[ -z "$disablecoin" ]]; then
printf "\n\nThe following coins can be disabled (case sensitive)\nbitcoin\nbitcoincash\ndash\ndecred\ndogecoin\nfiro\nlitecoin\nmonero\npivx\nwownero\n\n"
read -p 'Full name of coin to disable [example: wownero] ' disablecoin
fi
## Confirm
printf "\nDisable $disablecoin on your BasicSwap install, correct? Press any key to continue. CTRL-C to exit\n"
read
## Disable the coin
basicswap-prepare --datadir=$SWAP_DATADIR --disablecoin=$disablecoin