aboutsummaryrefslogtreecommitdiffstats
path: root/example_post-receive.sh
diff options
context:
space:
mode:
authorHiltjo Posthuma <[email protected]>2017-10-31 23:20:18 +0100
committerHiltjo Posthuma <[email protected]>2017-10-31 23:20:18 +0100
commitcfbf4a11adc8c2e3b55724e7341b18b21fc5b6f7 (patch)
treeeda0f6277afce722d5b33a7340193f24b2a15696 /example_post-receive.sh
parentd7e003a51924d1686574598f7db5557faf65000e (diff)
downloadstagit-cfbf4a11adc8c2e3b55724e7341b18b21fc5b6f7.tar.gz
stagit-cfbf4a11adc8c2e3b55724e7341b18b21fc5b6f7.zip
post-receive hook: force UTF-8 locale
this fixes encoding errors when the pages are generated in the post-receive hook.
Diffstat (limited to 'example_post-receive.sh')
-rwxr-xr-xexample_post-receive.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/example_post-receive.sh b/example_post-receive.sh
index ba87e51..549a7f8 100755
--- a/example_post-receive.sh
+++ b/example_post-receive.sh
@@ -8,6 +8,10 @@
# if name is not set the basename of the current directory is used,
# this is the directory of the repo when called from the post-receive script.
+# NOTE: needs to be set for correct locale (expects UTF-8) otherwise the
+# default is LC_CTYPE="POSIX".
+export LC_CTYPE="en_US.UTF-8"
+
name="$1"
if test "${name}" = ""; then
name=$(basename $(pwd))