#!/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 overriden 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