- Add debian/ packaging for .deb generation - Add .forgejo/workflows/build.yml for CI/CD (runner label: docker) - Add scripts/fullupdater and scripts/fullupdater-update - Remove obsolete install.sh - Update .gitignore for debian build artifacts
23 lines
546 B
Bash
23 lines
546 B
Bash
#!/bin/bash
|
|
set -e
|
|
|
|
VENV_DIR="/opt/full-updater/.venv"
|
|
OPT_DIR="/opt/full-updater"
|
|
|
|
# Create venv and install deps
|
|
if [ ! -d "$VENV_DIR" ]; then
|
|
python3 -m venv "$VENV_DIR"
|
|
fi
|
|
"$VENV_DIR/bin/pip" install --upgrade pip
|
|
"$VENV_DIR/bin/pip" install -r "$OPT_DIR/requirements.txt"
|
|
|
|
# Ensure symlinks
|
|
ln -sf "$OPT_DIR/scripts/fullupdater" /usr/local/bin/fullupdater
|
|
|
|
# Ensure cache dir exists
|
|
mkdir -p /tmp/full-updater-cache
|
|
|
|
# Upgrade existing install if deps changed
|
|
"$VENV_DIR/bin/pip" install -r "$OPT_DIR/requirements.txt" --upgrade
|
|
|
|
exit 0
|