ArchiveBox/pkg/debian/install.sh
Claude f3fcc1584c
Restore Homebrew and Debian package manager support
- Add Homebrew formula (brew_dist/archivebox.rb) using virtualenv pattern
  with auto-generation via homebrew-pypi-poet in bin/build_brew.sh
- Add Debian packaging via nFPM (pkg/debian/) with thin .deb that pip-installs
  archivebox into /opt/archivebox/venv on postinstall
- Add build/release scripts: bin/{build,release}_{brew,deb}.sh
- Update CI workflows to build packages on release and test them
- Update README apt/brew install instructions with working commands
- Update bin/setup.sh to use .deb download instead of old Launchpad PPA

https://claude.ai/code/session_01Vx1EsNrNySgsc8Y67dGzCn
2026-03-15 00:19:50 +00:00

34 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
# /opt/archivebox/install.sh - installs/upgrades archivebox into its virtualenv
# Called by the postinstall script and can be run manually to upgrade
set -e
ARCHIVEBOX_VENV="/opt/archivebox/venv"
ARCHIVEBOX_VERSION="${ARCHIVEBOX_VERSION:-}"
echo "[+] Setting up ArchiveBox virtualenv in $ARCHIVEBOX_VENV..."
# Create the virtualenv if it doesn't exist
if [ ! -d "$ARCHIVEBOX_VENV" ]; then
python3 -m venv "$ARCHIVEBOX_VENV"
fi
# Upgrade pip inside the virtualenv
"$ARCHIVEBOX_VENV/bin/python3" -m pip install --quiet --upgrade pip setuptools
# Install or upgrade archivebox
if [ -n "$ARCHIVEBOX_VERSION" ]; then
echo "[+] Installing archivebox==$ARCHIVEBOX_VERSION..."
"$ARCHIVEBOX_VENV/bin/pip" install --quiet --upgrade "archivebox==$ARCHIVEBOX_VERSION"
else
echo "[+] Installing latest archivebox..."
"$ARCHIVEBOX_VENV/bin/pip" install --quiet --upgrade archivebox
fi
echo "[+] Installing archivebox runtime dependencies..."
"$ARCHIVEBOX_VENV/bin/archivebox" install --binproviders pip,npm 2>/dev/null || true
echo "[√] ArchiveBox installed successfully."
echo " Run 'archivebox version' to verify."