This commit is contained in:
Justin (shocknet) 2024-07-05 17:36:45 -04:00
parent c2d214fd8c
commit 1ec83e0587
2 changed files with 13 additions and 3 deletions

View file

@ -7,7 +7,8 @@ install_lnd() {
USER_HOME=$HOME
fi
LND_VERSION=$(wget -qO- https://api.github.com/repos/lightningnetwork/lnd/releases/latest | grep 'tag_name' | cut -d\" -f4)
# Improved version extraction logic
LND_VERSION=$(wget -qO- https://api.github.com/repos/lightningnetwork/lnd/releases/latest | grep -oP '"tag_name": "\K(.*)(?=")')
LND_URL="https://github.com/lightningnetwork/lnd/releases/download/${LND_VERSION}/lnd-${OS}-${ARCH}-${LND_VERSION}.tar.gz"
# Check if LND is already installed