aboutsummaryrefslogtreecommitdiff
path: root/po/extract-strings.sh
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2021-10-03 12:22:57 -0300
committerEuAndreh <eu@euandre.org>2021-10-03 12:22:57 -0300
commitdfd56b73b2fc4edae07ec4dc46b0cf7b8525a3ae (patch)
tree3c25ee05556849257abd125411938e4e3a408296 /po/extract-strings.sh
parenttests/: Copy files to temp directory to avoid messing with existing generated... (diff)
downloadgit-permalink-dfd56b73b2fc4edae07ec4dc46b0cf7b8525a3ae.tar.gz
git-permalink-dfd56b73b2fc4edae07ec4dc46b0cf7b8525a3ae.tar.xz
po/extract-strings.sh: Use dedicated file for extracting strings
Diffstat (limited to '')
-rwxr-xr-xpo/extract-strings.sh17
1 files changed, 17 insertions, 0 deletions
diff --git a/po/extract-strings.sh b/po/extract-strings.sh
new file mode 100755
index 0000000..097cdda
--- /dev/null
+++ b/po/extract-strings.sh
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -eu
+
+awk '
+/^# End translatable strings$/ { exit }
+
+{ lines[i++] = $0 }
+
+END {
+ for (l = 0; l < i - 2; l++) {
+ if (l == 1) {
+ print "# shellcheck disable=2034"
+ }
+ print lines[l]
+ }
+}
+'