full_updater/debian/postinst
enzo fce1146ed8
Some checks failed
Build and Release .deb / build-deb (push) Failing after 22s
fix(debian): move fullupdater-update to /opt, symlink in postinst
- Install both scripts in /opt/full-updater/scripts/
- Create symlinks in /usr/local/bin via postinst
- Fixes dh_usrlocal error
2026-05-13 00:45:29 +02:00

24 lines
625 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
ln -sf "$OPT_DIR/scripts/fullupdater-update" /usr/local/bin/fullupdater-update
# 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