davical/testing/gitlab_ci_after_script.sh
Andrew Ruthven d7d7dd2ade Move the CI prep from repeated lines in the YML to a shell script
Oh, this is much easier to work with.

We can now detect the version of PostgreSQL installed and shouldn't
need to update CI just because PostgreSQL has been updated in Debian
Unstable.
2024-02-18 22:30:52 +13:00

17 lines
354 B
Bash
Executable File

#!/bin/bash
# Order: commandline, $CI_JOB_NAME, unknown
test="${1:-$CI_JOB_NAME}"
test="${test:-unknown}"
if [ -d /var/log/apache2 ]; then
mkdir -p apache2_log
cp -r /var/log/apache2 "apache2_log/$test"
xz apache2_log/"$test"/*
fi
if [ -d /var/log/davical ]; then
mkdir -p davical_log
cp -r /var/log/davical "davical_log/$test"
fi