System now exports a content package and imports one, by upload or from var/pakete. Pages with their revisions, areas, menus, media, forms, redirects, terms, translations, design and settings are replaced; submissions, statistics, tasks, plugin state and service keys stay, and accounts only come along when that is chosen explicitly. A backup comes first, the site is in maintenance meanwhile, and every file and document in the package is checked before anything is written. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
32 lines
1.5 KiB
Bash
32 lines
1.5 KiB
Bash
#!/bin/sh
|
|
# Wirft die Hüfner-Installation weg und baut sie neu auf. Nur fuer den Aufbau gedacht.
|
|
# Erstes Argument: der entpackte Entwurf (Ordner mit index.html und images/).
|
|
# Zweites Argument: Umuts Unterlagen (Alpakas, PQ, Freistellungsbescheinigungen, Signet).
|
|
set -e
|
|
root="C:/Django Project/KantSites"
|
|
php="${PHP_BINARY:-C:/php84/php.exe}"
|
|
export DATABASE_URL="sqlite:///$root/var/huefner.db"
|
|
export MEDIA_DIRECTORY="$root/var/huefner-media"
|
|
assets="$root/var/huefner-assets"
|
|
if [ -n "$1" ]; then
|
|
"$php" scripts/build-huefner-assets.php "$1" "$assets" "$2"
|
|
fi
|
|
if [ ! -f "$assets/favicon.png" ] || [ ! -f "$assets/pq-bescheinigung.pdf" ]; then
|
|
echo "Bilder fehlen: erst mit dem Ordner des Entwurfs und den Unterlagen als Argumente aufrufen." >&2
|
|
exit 1
|
|
fi
|
|
rm -f "$root/var/huefner.db"
|
|
rm -rf "$root/var/huefner-media"
|
|
"$php" vendor/bin/doctrine-migrations migrate --no-interaction -q
|
|
"$php" -d memory_limit=512M scripts/seed-huefner.php "$assets"
|
|
# Barlow und Barlow Condensed vom eigenen Server; der Abruf ergaenzt fonts.css nur.
|
|
if [ -f "$root/var/cacert.pem" ]; then
|
|
"$php" -d curl.cainfo="$root/var/cacert.pem" -d openssl.cafile="$root/var/cacert.pem" bin/console cms:fonts:fetch
|
|
else
|
|
"$php" bin/console cms:fonts:fetch
|
|
fi
|
|
# Das Inhaltspaket für die Live-Seite (ADR 118): dort unter System → Inhalte übertragen importieren.
|
|
# Konten bleiben dabei, wie sie live sind.
|
|
rm -f "$root/var/huefner-paket.zip"
|
|
"$php" bin/console cms:paket:export --ziel="$root/var/huefner-paket.zip"
|