mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-12-24 21:48:08 +00:00
bitcoin-cli: enable bash-completion (#608)
This commit is contained in:
parent
e6942153ee
commit
5c18d1fc79
|
@ -273,6 +273,7 @@ fi
|
||||||
BTC_UPGRADE_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/bitcoin-$BTC_VERSION-$ARCH.tar.gz
|
BTC_UPGRADE_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/bitcoin-$BTC_VERSION-$ARCH.tar.gz
|
||||||
BTC_UPGRADE_SHA256SUM_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS
|
BTC_UPGRADE_SHA256SUM_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS
|
||||||
BTC_UPGRADE_SHA256SUM_ASC_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS.asc
|
BTC_UPGRADE_SHA256SUM_ASC_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS.asc
|
||||||
|
BTC_CLI_COMPLETION_URL=https://raw.githubusercontent.com/bitcoin/bitcoin/v$BTC_VERSION/contrib/bitcoin-cli.bash-completion
|
||||||
CURRENT=""
|
CURRENT=""
|
||||||
if [ -f $BTC_VERSION_FILE ]; then
|
if [ -f $BTC_VERSION_FILE ]; then
|
||||||
CURRENT=$(cat $BTC_VERSION_FILE)
|
CURRENT=$(cat $BTC_VERSION_FILE)
|
||||||
|
@ -298,6 +299,10 @@ if [ "$CURRENT" != "$BTC_VERSION" ]; then
|
||||||
|
|
||||||
# Mark current version
|
# Mark current version
|
||||||
echo $BTC_VERSION > $BTC_VERSION_FILE
|
echo $BTC_VERSION > $BTC_VERSION_FILE
|
||||||
|
|
||||||
|
# Install bash-completion for bitcoin-cli
|
||||||
|
wget $BTC_CLI_COMPLETION_URL -O bitcoin-cli.bash-completion
|
||||||
|
sudo cp bitcoin-cli.bash-completion /etc/bash_completion.d/bitcoin-cli
|
||||||
else
|
else
|
||||||
echo "ERROR UPGRADING BITCOIN - GPG FAILED"
|
echo "ERROR UPGRADING BITCOIN - GPG FAILED"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -329,6 +329,7 @@ fi
|
||||||
BTC_UPGRADE_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/bitcoin-$BTC_VERSION-$ARCH.tar.gz
|
BTC_UPGRADE_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/bitcoin-$BTC_VERSION-$ARCH.tar.gz
|
||||||
BTC_UPGRADE_SHA256SUM_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS
|
BTC_UPGRADE_SHA256SUM_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS
|
||||||
BTC_UPGRADE_SHA256SUM_ASC_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS.asc
|
BTC_UPGRADE_SHA256SUM_ASC_URL=https://bitcoincore.org/bin/bitcoin-core-$BTC_VERSION/SHA256SUMS.asc
|
||||||
|
BTC_CLI_COMPLETION_URL=https://raw.githubusercontent.com/bitcoin/bitcoin/v$BTC_VERSION/contrib/bitcoin-cli.bash-completion
|
||||||
CURRENT=""
|
CURRENT=""
|
||||||
if [ -f $BTC_VERSION_FILE ]; then
|
if [ -f $BTC_VERSION_FILE ]; then
|
||||||
CURRENT=$(cat $BTC_VERSION_FILE)
|
CURRENT=$(cat $BTC_VERSION_FILE)
|
||||||
|
@ -359,6 +360,10 @@ if [ "$CURRENT" != "$BTC_VERSION" ]; then
|
||||||
fi
|
fi
|
||||||
mkdir -p /home/admin/.bitcoin
|
mkdir -p /home/admin/.bitcoin
|
||||||
echo $BTC_VERSION > $BTC_VERSION_FILE
|
echo $BTC_VERSION > $BTC_VERSION_FILE
|
||||||
|
|
||||||
|
# Install bash-completion for bitcoin-cli
|
||||||
|
wget $BTC_CLI_COMPLETION_URL -O bitcoin-cli.bash-completion
|
||||||
|
sudo cp bitcoin-cli.bash-completion /etc/bash_completion.d/bitcoin-cli
|
||||||
fi
|
fi
|
||||||
cd ~
|
cd ~
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user