From 293da1f64307f46f0917706660c647424dd895ff Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sun, 15 Mar 2026 18:47:54 -0400 Subject: [PATCH] Add remote install script for one-line curl installation Added remote-install.sh for easy one-line installation: curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/LBRY-Downloader/main/remote-install.sh | bash Updated documentation: - README.md - Added one-line install command - QUICKSTART.md - Added one-line install option - LINUX_SETUP.md - Added one-line install section Users can now install with a single curl command (requires Git and Python 3.8+) --- LINUX_SETUP.md | 21 ++++++++-- QUICKSTART.md | 10 ++++- README.md | 12 +++++- remote-install.sh | 103 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 141 insertions(+), 5 deletions(-) create mode 100755 remote-install.sh diff --git a/LINUX_SETUP.md b/LINUX_SETUP.md index 82aa449..f1aab81 100644 --- a/LINUX_SETUP.md +++ b/LINUX_SETUP.md @@ -2,13 +2,28 @@ Complete instructions for setting up LBRY Downloader on Debian-based Linux distributions. -## Quick Start (Automated Setup) +## One-Line Install (Easiest) -The easiest way to install is using the interactive setup script: +Install with a single command using curl: + +```bash +curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/LBRY-Downloader/main/remote-install.sh | bash +``` + +**Requirements:** Git and Python 3.8+ must be installed. + +**What this does:** +1. Downloads the repository +2. Runs the interactive setup script +3. Configures everything automatically + +## Interactive Setup + +If you prefer to clone manually, use the interactive setup script: ```bash # Clone the repository -git clone https://github.com/yourusername/LBRY-Downloader.git +git clone https://github.com/PR0M3TH3AN/LBRY-Downloader.git cd LBRY-Downloader # Run the interactive installer diff --git a/QUICKSTART.md b/QUICKSTART.md index ded676c..b1c3f2b 100644 --- a/QUICKSTART.md +++ b/QUICKSTART.md @@ -1,6 +1,14 @@ # Quick Start Guide -## Installation +## One-Line Install + +```bash +curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/LBRY-Downloader/main/remote-install.sh | bash +``` + +**Requirements:** Git and Python 3.8+ must be installed. + +## Manual Installation ```bash # Clone or download the repository diff --git a/README.md b/README.md index b1ffda5..a44e636 100644 --- a/README.md +++ b/README.md @@ -15,13 +15,23 @@ A Python tool that incrementally syncs downloadable file claims from configured ## Installation +### One-Line Install (Easiest) + +Install with a single command using curl: + +```bash +curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/LBRY-Downloader/main/remote-install.sh | bash +``` + +**Requirements:** Git and Python 3.8+ must be installed. + ### Easy Install (Recommended) Run the interactive setup script that handles everything: ```bash # Clone the repository -git clone https://github.com/yourusername/LBRY-Downloader.git +git clone https://github.com/PR0M3TH3AN/LBRY-Downloader.git cd LBRY-Downloader # Run the interactive installer diff --git a/remote-install.sh b/remote-install.sh new file mode 100755 index 0000000..03ecc37 --- /dev/null +++ b/remote-install.sh @@ -0,0 +1,103 @@ +#!/bin/bash +# +# LBRY Downloader - Remote Installation Script +# +# This script can be curl'd and piped to bash for easy installation: +# curl -fsSL https://raw.githubusercontent.com/PR0M3TH3AN/LBRY-Downloader/main/remote-install.sh | bash +# + +set -e + +REPO_URL="https://github.com/PR0M3TH3AN/LBRY-Downloader.git" +INSTALL_DIR="${HOME}/Documents/LBRY-Downloader" + +echo "==========================================" +echo " LBRY Downloader - Remote Installer" +echo "==========================================" +echo "" + +# Colors +GREEN='\033[0;32m' +YELLOW='\033[1;33m' +RED='\033[0;31m' +NC='\033[0m' # No Color + +print_status() { + echo -e "${GREEN}✓${NC} $1" +} + +print_warning() { + echo -e "${YELLOW}⚠${NC} $1" +} + +print_error() { + echo -e "${RED}✗${NC} $1" +} + +# Check for required tools +if ! command -v git &> /dev/null; then + print_error "Git is required but not installed" + echo "Please install Git first:" + echo " sudo apt-get install git # Debian/Ubuntu/Mint" + echo " sudo dnf install git # Fedora" + echo " sudo pacman -S git # Arch" + exit 1 +fi + +if ! command -v python3 &> /dev/null; then + print_error "Python 3 is required but not installed" + echo "Please install Python 3.8 or higher" + exit 1 +fi + +# Check Python version +PYTHON_VERSION=$(python3 --version 2>&1 | awk '{print $2}' | cut -d. -f1,2) +REQUIRED="3.8" + +if [ "$(printf '%s\n' "$REQUIRED" "$PYTHON_VERSION" | sort -V | head -n1)" != "$REQUIRED" ]; then + print_error "Python 3.8+ required, found $PYTHON_VERSION" + exit 1 +fi + +print_status "Python $PYTHON_VERSION found" + +# Check if already installed +if [ -d "$INSTALL_DIR" ]; then + print_warning "LBRY Downloader already exists at $INSTALL_DIR" + read -p "Reinstall? This will backup your config. (y/N): " -n 1 -r + echo + if [[ $REPLY =~ ^[Yy]$ ]]; then + # Backup config if it exists + if [ -f "$HOME/Documents/lbry-downloads/config.yaml" ]; then + BACKUP_DIR="$HOME/.lbry-downloader-backup-$(date +%Y%m%d-%H%M%S)" + mkdir -p "$BACKUP_DIR" + cp -r "$HOME/Documents/lbry-downloads" "$BACKUP_DIR/" + print_status "Backed up config to $BACKUP_DIR" + fi + rm -rf "$INSTALL_DIR" + else + echo "Installation cancelled" + exit 0 + fi +fi + +# Clone repository +print_status "Downloading LBRY Downloader..." +git clone --depth 1 "$REPO_URL" "$INSTALL_DIR" + +# Run setup +print_status "Starting setup..." +cd "$INSTALL_DIR" +./setup.py + +echo "" +echo "==========================================" +print_status "Installation complete!" +echo "==========================================" +echo "" +echo "You can now run LBRY Downloader:" +echo " cd $INSTALL_DIR && ./bin/lbry-downloader" +echo "" +echo "Or add to your PATH:" +echo " echo 'export PATH=\"$INSTALL_DIR/bin:\$PATH\"' >> ~/.bashrc" +echo ""