From 1d5c1db5cd1c13ebb2e3667c6ff8df16bfbc3031 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 15 Mar 2026 21:22:06 -0400 Subject: [PATCH] Add automatic lbrynet installation to remote-install.sh The install script now: - Checks if lbrynet (LBRY SDK) is installed - If not, offers to download and install it automatically - Downloads latest version from GitHub releases - Extracts to ~/.local/bin - Adds to PATH if needed - Shows clear status messages throughout This means users no longer need to manually install lbrynet. The script handles Python dependencies AND lbrynet installation. --- remote-install.sh | 68 +++++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 63 insertions(+), 5 deletions(-) diff --git a/remote-install.sh b/remote-install.sh index c4e8093..968176a 100755 --- a/remote-install.sh +++ b/remote-install.sh @@ -69,6 +69,62 @@ fi print_status "Python $PYTHON_VERSION found" +# Check if lbrynet is installed +if ! command -v lbrynet &> /dev/null; then + print_warning "LBRY SDK (lbrynet) not found" + echo "" + echo "The LBRY SDK is required to download content from the LBRY network." + echo "It can be downloaded from: https://github.com/lbryio/lbry-sdk/releases" + echo "" + read -p "Download and install lbrynet automatically? (Y/n): " -n 1 -r + echo + if [[ ! $REPLY =~ ^[Nn]$ ]]; then + print_status "Installing LBRY SDK..." + + # Create bin directory + mkdir -p ~/.local/bin + + # Download latest lbrynet for Linux + LBRY_VERSION="0.113.0" + DOWNLOAD_URL="https://github.com/lbryio/lbry-sdk/releases/download/v${LBRY_VERSION}/lbry-sdk-linux.zip" + + cd ~/.local/bin + if wget -q --show-progress "$DOWNLOAD_URL" 2>&1 | tail -5; then + print_status "Downloaded lbrynet" + + # Extract + if unzip -q lbry-sdk-linux.zip; then + rm lbry-sdk-linux.zip + chmod +x lbrynet + print_status "Extracted lbrynet" + + # Add to PATH if not already there + if ! echo "$PATH" | grep -q "$HOME/.local/bin"; then + echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc + print_status "Added ~/.local/bin to PATH" + export PATH="$HOME/.local/bin:$PATH" + fi + + print_status "LBRY SDK installed successfully!" + else + print_error "Failed to extract lbrynet" + fi + else + print_error "Failed to download lbrynet" + echo "Please install manually from:" + echo " https://github.com/lbryio/lbry-sdk/releases" + fi + + # Return to original directory + cd - > /dev/null + else + print_warning "Skipping lbrynet installation" + echo "You'll need to install it manually before using the downloader" + fi +else + print_status "lbrynet found at: $(which lbrynet)" +fi + # Check if running in interactive mode INTERACTIVE=false if [ -t 0 ]; then @@ -116,17 +172,19 @@ echo "" echo "1️⃣ Reload your shell (IMPORTANT):" echo " source ~/.bashrc" echo "" -echo "2️⃣ Start the LBRY daemon:" -echo " lbrynet start" -echo "" -echo "3️⃣ Test the downloader:" +echo "2️⃣ Test the downloader (daemon starts automatically):" echo " lbry-downloader --dry-run" echo "" -echo "4️⃣ Download content:" +echo "3️⃣ Download content:" echo " lbry-downloader" echo "" echo "💡 If 'lbry-downloader' command not found after reload, use:" echo " ~/Documents/LBRY-Downloader/bin/lbry-downloader" echo "" +echo "⚠️ If lbrynet was not installed automatically, install it from:" +echo " https://github.com/lbryio/lbry-sdk/releases" +echo " Then run: lbrynet start" +echo " ~/Documents/LBRY-Downloader/bin/lbry-downloader" +echo "" echo "📁 Config file: ~/Documents/lbry-downloads/config.yaml" echo ""