Files
Febe/.gitea/scripts/ambiente-prove.sh
T
Alby96andClaude Opus 5.5 009e7d6710 CI e installatore: commenti degli script in inglese (#43)
La regola del progetto è «codice e commenti in inglese; interfaccia, documenti
e messaggi in italiano», e gli script di .gitea/ (script e flussi), di
installer/ e docker/entrypoint.sh avevano ancora i commenti in italiano
(decisione di Alberto del 29 novembre 2026). Cambiano solo i commenti: i
messaggi che una persona legge (echo, ::warning::, ::error::, nomi dei passi,
note della release) restano in italiano e nessun comando cambia. I programmi
awk e gli script finti delle prove erano già in inglese.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-29 12:03:13 +01:00

35 lines
1.6 KiB
Bash
Executable File

#!/usr/bin/env bash
# Prepares the Debian container of the «prove» job (debian:trixie, plain Debian 13: no JavaScript action, hence no
# Node) so that no test is skipped: the distribution's real Chromium (on Ubuntu it is a snap, which does not work in
# containers) with its languages, Xvfb, the it_IT.UTF-8 locale, time zones and the same fonts as the Febe image; ICU,
# OpenSSL, zlib and libstdc++ for the .NET SDK (dotnet.sh). git, curl and the certificates are installed by the step
# before the sources. setpriv, getent and the nobody user (65534) come with Debian (tests of the container start).
#
# .gitea/scripts/ambiente-prove.sh
set -euo pipefail
sudo=""
[[ "$(id -u)" == 0 ]] || sudo="sudo"
export DEBIAN_FRONTEND=noninteractive
$sudo apt-get update -qq
$sudo apt-get install -y -qq --no-install-recommends \
chromium chromium-l10n \
xvfb \
locales tzdata libicu76 libssl3t64 zlib1g libstdc++6 ca-certificates curl git \
fonts-noto-color-emoji fonts-dejavu-core \
util-linux procps > /dev/null
$sudo sed -i 's/^# *\(it_IT.UTF-8 UTF-8\)/\1/' /etc/locale.gen
$sudo locale-gen > /dev/null
echo "== Strumenti delle prove"
chromium --version
command -v Xvfb
locale -a | grep -i '^it_IT\.utf8$'
for strumento in setpriv getent stat chown sh awk sort; do command -v "$strumento" > /dev/null || { echo "Manca $strumento." >&2; exit 1; }; done
if command -v node > /dev/null; then
echo "C'è node in questo contenitore: la CI non deve usarlo (nessuna azione JavaScript, nessuno script Node)." >&2
exit 1
fi
getent passwd 65534 > /dev/null && getent group 65534 > /dev/null || { echo "Mancano l'utente o il gruppo 65534 (nobody)." >&2; exit 1; }