summaryrefslogtreecommitdiff
path: root/etckeeper
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2015-03-14 13:23:56 -0400
committerJoey Hess <joeyh@joeyh.name>2015-03-14 13:23:56 -0400
commit0dd5ff64bf4dba9a2e54c7f29c96998af5dcebce (patch)
tree6634e3c1a33711652b9c368a6c300610455bb300 /etckeeper
parente0e6a2c6c5b9a00d7c9dce29c85fb906dbbfa163 (diff)
Set LANG=C internally when doing some operations that have been reported to fail in other locales.
Bug report: > + egrep -q '[^-a-z_]' > + echo 'etckeeper: invalid command init' Strangely, I cannot reproduce this problem when using the LANG=et_EE.UTF-8 locale. I guess our egreps are somehow behaving differently, even though a-z is not a character class that should be affected by locale AFAIK. I'll go ahead and set LANG=C when calling things that use character classes.
Diffstat (limited to 'etckeeper')
-rwxr-xr-xetckeeper4
1 files changed, 2 insertions, 2 deletions
diff --git a/etckeeper b/etckeeper
index e669537..6671e24 100755
--- a/etckeeper
+++ b/etckeeper
@@ -79,7 +79,7 @@ elif [ "$command" = "pre-apt" ]; then
command=pre-install
fi
-if echo "$command" | egrep -q '[^-a-z_]'; then
+if echo "$command" | LANG=C egrep -q '[^-a-z_]'; then
echo "etckeeper: invalid command $command" >&2
exit 1
fi
@@ -121,7 +121,7 @@ fi
export VCS
lsscripts() {
- perl -e '
+ LANG=C perl -e '
$dir=shift;
print join "\n", grep { ! -d $_ && -x $_ }
grep /^\Q$dir\/\E[-a-zA-Z0-9]+$/,