Files
discourse-hledger/bin/setup-dev
T
raucao 87d9c75dc1
CI / lint (push) Successful in 1m33s
CI / tests (push) Successful in 7m33s
Fix plugin name to match repo name, convention
2026-09-27 17:12:40 +02:00

23 lines
789 B
Bash
Executable File

#!/usr/bin/env bash
# Install the system dependencies needed to develop and test the hledger plugin.
#
# Run inside the dev container as root, for example:
# docker exec -u root discourse_dev bash /src/plugins/discourse-hledger/bin/setup-dev
set -euo pipefail
if [ "$(id -u)" -ne 0 ]; then
echo "Run as root inside the dev container, eg: docker exec -u root discourse_dev bash /src/plugins/discourse-hledger/bin/setup-dev" >&2
exit 1
fi
apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y hledger chromium chromium-driver chromium-sandbox
# System specs use Playwright, which needs its own Chromium build for the
# discourse user.
runuser -u discourse -- bash -lc "cd /src && pnpm playwright-install"
echo "Installed:"
hledger --version | head -1
chromium --version