blob: a2b1ad31cb453b38d4e183eda51d160854aaece4 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#!/bin/bash
# This program is run by a CI job
if [[ ! -d po || ! -d src ]]; then
printf "Please run this in top level directory"
exit 1
fi
printf "# Generated by %s, do not edit manually\n" "$0" > po/POTFILES.in
#printf "Environment LANG is '%s'\n" "$(env | grep '^LANG=')"
#printf "Environment LC_COLLATE is '%s'\n" "$(env | grep '^LC_COLLATE=')"
#if command -v locale >/dev/null; then
# printf "locale LC_COLLATE is '%s'\n" "$(locale | grep '^LC_COLLATE=')"
#fi
# See WARNING in manpage of GNU Coreutils sort:
# LC_COLLATE override is required to preserve the order of files
# across platforms. But it can be override by LC_ALL.
# But, LC_ALL should never be set in a sane environment.
grep "_(" src \
--binary-files=without-match \
--files-with-matches \
--recursive \
| LC_COLLATE="C" sort >> po/POTFILES.in
|