#!/bin/sh

set -e

# We need to be root here ...
for locale in 'cs_CZ.UTF-8 UTF-8' 'de_DE.UTF-8 UTF-8' 'tr_TR ISO-8859-9' 'tr_TR.UTF-8 UTF-8'; do
  sed -i -e "0,/^[# ]*$locale *$/ s/^[# ]*$locale *$/$locale/" /etc/locale.gen
done
locale-gen

# ... but not here
# an UTF-8 LANG is needed (not C.UTF-8)
export LANG=cs_CZ.UTF-8
cd Horde_Util*/test/./Horde/Util
su www-data --preserve-environment --shell /bin/sh --command 'phpunit -v .'
