bitcoin-cli: enable bash-completion (#608)

This commit is contained in:
Miller 2021-12-13 18:39:20 -05:00 committed by GitHub
parent e6942153ee
commit 5c18d1fc79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -273,6 +273,7 @@ fi
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_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=""
if [ -f $BTC_VERSION_FILE ]; then
CURRENT=$(cat $BTC_VERSION_FILE)
@ -298,6 +299,10 @@ if [ "$CURRENT" != "$BTC_VERSION" ]; then
# Mark current version
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
echo "ERROR UPGRADING BITCOIN - GPG FAILED"
fi

View File

@ -329,6 +329,7 @@ fi
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_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=""
if [ -f $BTC_VERSION_FILE ]; then
CURRENT=$(cat $BTC_VERSION_FILE)
@ -359,6 +360,10 @@ if [ "$CURRENT" != "$BTC_VERSION" ]; then
fi
mkdir -p /home/admin/.bitcoin
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
cd ~