lncli: enable bash-completion (#605)

* lncli: enable bash-completion during LND upgrade

* lncli: enable bash-completion in setup_device.sh
This commit is contained in:
Miller 2021-12-12 22:10:24 -05:00 committed by GitHub
parent c2c1e8a81d
commit 466a1a73bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View File

@ -316,6 +316,7 @@ if [ $IS_RASPI4_ARM64 = 1 ]; then
LND_ARCH="lnd-linux-arm64"
fi
LND_UPGRADE_URL=https://github.com/lightningnetwork/lnd/releases/download/$LND_VERSION/$LND_ARCH-$LND_VERSION.tar.gz
LNCLI_COMPLETION_URL=https://raw.githubusercontent.com/lightningnetwork/lnd/$LND_VERSION/contrib/lncli.bash-completion
CURRENT=""
if [ -f $LND_VERSION_FILE ]; then
CURRENT=$(cat $LND_VERSION_FILE)
@ -342,6 +343,10 @@ if [ "$CURRENT" != "$LND_VERSION" ]; then
else
echo "ERROR UPGRADING LND - GPG FAILED"
fi
# Download bash-completion file for lncli
wget $LNCLI_COMPLETION_URL
sudo cp lncli.bash-completion /etc/bash_completion.d/lncli
fi
# Upgrade Loop

View File

@ -371,6 +371,8 @@ if [ $IS_RASPI4_ARM64 = 1 ]; then
LND_ARCH="lnd-linux-arm64"
fi
LND_UPGRADE_URL=https://github.com/lightningnetwork/lnd/releases/download/$LND_VERSION/$LND_ARCH-$LND_VERSION.tar.gz
LNCLI_COMPLETION_URL=https://raw.githubusercontent.com/lightningnetwork/lnd/$LND_VERSION/contrib/lncli.bash-completion
CURRENT=""
if [ -f $LND_VERSION_FILE ]; then
CURRENT=$(cat $LND_VERSION_FILE)
@ -392,6 +394,10 @@ if [ "$CURRENT" != "$LND_VERSION" ]; then
ln -s /bin/ip /usr/bin/ip || true
echo $LND_VERSION > $LND_VERSION_FILE
# Download bash-completion file for lncli
wget $LNCLI_COMPLETION_URL
sudo cp lncli.bash-completion /etc/bash_completion.d/lncli
fi
cd ~