From cfbbf52a744d0ce7ebcca49702924c6df7d6428c Mon Sep 17 00:00:00 2001 From: Pavel Raiskup Date: Fri, 17 Oct 2014 13:12:23 +0200 Subject: gen-data/tasks: add new 'locale-cz' task This data should help with checking of 'postgresql --upgrade' behavior when the system locale changed significantly (from en_US.UTF-8 to cs_CZ.utf8). * gen-data/tasks/locale-cz/run.sh: New task file. * gen-data/generate (locale_prereq): Fix missing LANG= prefix in expected locale. Quote current/expected locale strings in error output. (single_task): Adjust $INDENT in sub-shell to not affect subsequent calls. Create tarball in $OUTPUTDIR rather than in `pwd`. Introduce hook_end callback. (generate_tasks): Use dynamic list of tasks. --- gen-data/tasks/locale-cz/run.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 gen-data/tasks/locale-cz/run.sh (limited to 'gen-data/tasks') diff --git a/gen-data/tasks/locale-cz/run.sh b/gen-data/tasks/locale-cz/run.sh new file mode 100644 index 0000000..12f0a48 --- /dev/null +++ b/gen-data/tasks/locale-cz/run.sh @@ -0,0 +1,18 @@ +export task_name="cz-locale" + +hook_start() +{ + export CHECK_LOCALE=0 + ___old_locale="$(cat /etc/locale.conf)" + echo "LANG=cs_CZ.UTF-8" > /etc/locale.conf +} + +hook_end() +{ + echo "$___old_locale" > /etc/locale.conf +} + +run() +{ + create_pagila +} -- cgit