mirror of
https://github.com/nahuhh/basicswap-bash.git
synced 2025-03-31 03:29:02 +00:00
add/remove: allow variable
This commit is contained in:
parent
3d51d62b49
commit
954e293043
4 changed files with 13 additions and 4 deletions
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue