aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2020-12-15 14:04:21 -0300
committerEuAndreh <eu@euandre.org>2020-12-15 14:04:41 -0300
commitc75b69359c42f8840e1f5b095e5279af1944d68a (patch)
tree9afb0f78b56cb890e2032d25b2e1e51b7359b412
parentAdd TIL on Awk (diff)
downloadeuandre.org-c75b69359c42f8840e1f5b095e5279af1944d68a.tar.gz
euandre.org-c75b69359c42f8840e1f5b095e5279af1944d68a.tar.xz
Update locale files
-rw-r--r--locale/eo/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po15
-rw-r--r--locale/eo/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po93
-rw-r--r--locale/eo/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po192
-rw-r--r--locale/fr/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po15
-rw-r--r--locale/fr/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po93
-rw-r--r--locale/fr/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po192
-rw-r--r--locale/pt/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po15
-rw-r--r--locale/pt/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po93
-rw-r--r--locale/pt/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po192
9 files changed, 885 insertions, 15 deletions
diff --git a/locale/eo/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po b/locale/eo/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
index 1070e1b..7b2d4bd 100644
--- a/locale/eo/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
+++ b/locale/eo/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
@@ -2,11 +2,6 @@
msgid ""
msgstr ""
-msgid ""
-"[FIXED](https://discourse.nixos.org/t/inconsistent-hash-of-"
-"buildgomodule/3127/2)."
-msgstr ""
-
msgid "Offending derivation:"
msgstr ""
@@ -1067,6 +1062,16 @@ msgid ""
"repository](https://git.euandreh.xyz/vps/tree/default.nix?id=6ba76140238b5e3c7009c201f9f80ac86063f438#n3):"
msgstr ""
+msgid ""
+"FIXED: See https://discourse.nixos.org/t/inconsistent-hash-of-"
+"buildgomodule/3127/2"
+msgstr ""
+
+#~ msgid ""
+#~ "[FIXED](https://discourse.nixos.org/t/inconsistent-hash-of-"
+#~ "buildgomodule/3127/2)."
+#~ msgstr ""
+
#~ msgid ""
#~ "[Full source code on "
#~ "sr.ht](https://git.euandreh.xyz/vps/tree/default.nix?id=6ba76140238b5e3c7009c201f9f80ac86063f438#n3):"
diff --git a/locale/eo/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po b/locale/eo/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po
new file mode 100644
index 0000000..084c259
--- /dev/null
+++ b/locale/eo/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po
@@ -0,0 +1,93 @@
+#
+msgid ""
+msgstr ""
+
+msgid ""
+"title: Failure with relocatable Guix pack tarball\n"
+"date: 2020-12-15\n"
+"layout: pastebin\n"
+"lang: en"
+msgstr ""
+
+msgid "FIXED: Use `GUIX_PROFILE= source etc/profile`"
+msgstr ""
+
+msgid ""
+"The example from the [blog post](https://guix.gnu.org/blog/2018/tarballs-"
+"the-ultimate-container-image-format/) fails."
+msgstr ""
+
+msgid ""
+"$ tar xf `guix pack --relocatable -S /bin=bin -S /etc=etc guile gnutls guile-json`\n"
+"$ source etc/profile\n"
+"$ bin/guile -c '(use-modules (json))'\n"
+"guile: warning: failed to install locale\n"
+"Backtrace:\n"
+"In ice-9/boot-9.scm:\n"
+" 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)\n"
+"In unknown file:\n"
+" 12 (apply-smob/0 #<thunk 7f9d240ca740>)\n"
+"In ice-9/boot-9.scm:\n"
+" 718:2 11 (call-with-prompt (\"prompt\") #<procedure 7f9d240db740 ?> ?)\n"
+"In ice-9/eval.scm:\n"
+" 619:8 10 (_ #(#(#<directory (guile-user) 7f9d23d00f00>)))\n"
+"In ice-9/command-line.scm:\n"
+" 185:18 9 (_ #<input: string 7f9d23cfaa10>)\n"
+"In unknown file:\n"
+" 8 (eval (use-modules (json)) #<directory (guile-user) 7f9?>)\n"
+"In ice-9/eval.scm:\n"
+" 721:20 7 (primitive-eval (use-modules (json)))\n"
+"In ice-9/psyntax.scm:\n"
+" 1241:36 6 (expand-top-sequence ((use-modules (json))) _ _ #f _ _ _)\n"
+" 1233:19 5 (parse _ ((\"placeholder\" placeholder)) ((top) #(# # ?)) ?)\n"
+" 285:10 4 (parse _ ((\"placeholder\" placeholder)) (()) _ c&e (eval) ?)\n"
+"In ice-9/boot-9.scm:\n"
+" 3898:20 3 (process-use-modules _)\n"
+" 222:17 2 (map1 (((json))))\n"
+" 3899:31 1 (_ ((json)))\n"
+" 3300:6 0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?)\n"
+"\n"
+"ice-9/boot-9.scm:3300:6: In procedure resolve-interface:\n"
+"no code for module (json)\n"
+"$ bin/guile -c '(use-modules (gnutls))'\n"
+"guile: warning: failed to install locale\n"
+"Backtrace:\n"
+"In ice-9/boot-9.scm:\n"
+" 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)\n"
+"In unknown file:\n"
+" 12 (apply-smob/0 #<thunk 7f7fe607a7c0>)\n"
+"In ice-9/boot-9.scm:\n"
+" 718:2 11 (call-with-prompt (\"prompt\") #<procedure 7f7fe6085940 ?> ?)\n"
+"In ice-9/eval.scm:\n"
+" 619:8 10 (_ #(#(#<directory (guile-user) 7f7fe5ca8f00>)))\n"
+"In ice-9/command-line.scm:\n"
+" 185:18 9 (_ #<input: string 7f7fe5ca2a10>)\n"
+"In unknown file:\n"
+" 8 (eval (use-modules (gnutls)) #<directory (guile-user) 7?>)\n"
+"In ice-9/eval.scm:\n"
+" 721:20 7 (primitive-eval (use-modules (gnutls)))\n"
+"In ice-9/psyntax.scm:\n"
+" 1241:36 6 (expand-top-sequence ((use-modules (gnutls))) _ _ #f _ _ ?)\n"
+" 1233:19 5 (parse _ ((\"placeholder\" placeholder)) ((top) #(# # ?)) ?)\n"
+" 285:10 4 (parse _ ((\"placeholder\" placeholder)) (()) _ c&e (eval) ?)\n"
+"In ice-9/boot-9.scm:\n"
+" 3898:20 3 (process-use-modules _)\n"
+" 222:17 2 (map1 (((gnutls))))\n"
+" 3899:31 1 (_ ((gnutls)))\n"
+" 3300:6 0 (resolve-interface (gnutls) #:select _ #:hide _ #:prefix ?)\n"
+"\n"
+"ice-9/boot-9.scm:3300:6: In procedure resolve-interface:\n"
+"no code for module (gnutls)\n"
+msgstr ""
+
+msgid "My Guix version if fairly recent:"
+msgstr ""
+
+msgid ""
+"$ guix describe\n"
+"Génération 83 14 déc. 2020 00:28:16 (actuelle)\n"
+" guix 41807eb\n"
+" URL du dépôt : https://git.savannah.gnu.org/git/guix.git\n"
+" branche: master\n"
+" commit : 41807eb5329299b8c45cd49356a4ead01ce0d469\n"
+msgstr ""
diff --git a/locale/eo/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po b/locale/eo/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po
new file mode 100644
index 0000000..8c55368
--- /dev/null
+++ b/locale/eo/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po
@@ -0,0 +1,192 @@
+#
+msgid ""
+msgstr ""
+
+msgid ""
+"Inspired by Fred Herbert's \"[Awk in 20 Minutes](https://ferd.ca/awk-"
+"in-20-minutes.html)\", here's a problem I just solved with a line of Awk: "
+"run ShellCheck in all scripts of a repository."
+msgstr ""
+
+msgid ""
+"In my repositories I usually have Bash and POSIX scripts, which I want to "
+"keep tidy with [ShellCheck](https://www.shellcheck.net/). Here's the first "
+"version of `assert-shellcheck.sh`:"
+msgstr ""
+
+msgid ""
+"#!/bin/sh\n"
+"set -eu\n"
+"\n"
+"find . -type f -name '*.sh' -print0 | xargs -0 shellcheck\n"
+msgstr ""
+
+msgid ""
+"This is the type of script that I copy around to all repositories, and I "
+"want it to be capable of working on any repository, without requiring a list"
+" of files to run ShellCheck on."
+msgstr ""
+
+msgid ""
+"This first version worked fine, as all my scripts had the '.sh' ending. But "
+"I recently added some scripts without any extension, so `assert-"
+"shellcheck.sh` called for a second version. The first attempt was to try "
+"grepping the shebang line:"
+msgstr ""
+
+msgid ""
+"$ grep '^#!/' assert-shellcheck.sh\n"
+"#!/usr/sh\n"
+msgstr ""
+
+msgid ""
+"Good, we have a grep pattern on the first try. Let's try to find all the "
+"matching files:"
+msgstr ""
+
+msgid ""
+"$ find . -type f | xargs grep -l '^#!/'\n"
+"./TODOs.org\n"
+"./.git/hooks/pre-commit.sample\n"
+"./.git/hooks/pre-push.sample\n"
+"./.git/hooks/pre-merge-commit.sample\n"
+"./.git/hooks/fsmonitor-watchman.sample\n"
+"./.git/hooks/pre-applypatch.sample\n"
+"./.git/hooks/pre-push\n"
+"./.git/hooks/prepare-commit-msg.sample\n"
+"./.git/hooks/commit-msg.sample\n"
+"./.git/hooks/post-update.sample\n"
+"./.git/hooks/pre-receive.sample\n"
+"./.git/hooks/applypatch-msg.sample\n"
+"./.git/hooks/pre-rebase.sample\n"
+"./.git/hooks/update.sample\n"
+"./build-aux/with-guile-env.in\n"
+"./build-aux/test-driver\n"
+"./build-aux/missing\n"
+"./build-aux/install-sh\n"
+"./build-aux/install-sh~\n"
+"./bootstrap\n"
+"./scripts/assert-todos.sh\n"
+"./scripts/songbooks\n"
+"./scripts/compile-readme.sh\n"
+"./scripts/ci-build.sh\n"
+"./scripts/generate-tasks-and-bugs.sh\n"
+"./scripts/songbooks.in\n"
+"./scripts/with-container.sh\n"
+"./scripts/assert-shellcheck.sh\n"
+msgstr ""
+
+msgid ""
+"This approach has a problem, though: it includes files ignored by Git, such "
+"as `builld-aux/install-sh~`, and even goes into the `.git/` directory and "
+"finds sample hooks in `.git/hooks/*`."
+msgstr ""
+
+msgid "To list the files that Git is tracking we'll try `git ls-files`:"
+msgstr ""
+
+msgid ""
+"$ git ls-files | xargs grep -l '^#!/'\n"
+"TODOs.org\n"
+"bootstrap\n"
+"build-aux/with-guile-env.in\n"
+"old/scripts/assert-docs-spelling.sh\n"
+"old/scripts/build-site.sh\n"
+"old/scripts/builder.bats.sh\n"
+"scripts/assert-shellcheck.sh\n"
+"scripts/assert-todos.sh\n"
+"scripts/ci-build.sh\n"
+"scripts/compile-readme.sh\n"
+"scripts/generate-tasks-and-bugs.sh\n"
+"scripts/songbooks.in\n"
+"scripts/with-container.sh\n"
+msgstr ""
+
+msgid ""
+"It looks to be almost there, but the `TODOs.org` entry shows a flaw in it: "
+"grep is looking for a `'^#!/'` pattern on any part of the file. In my case, "
+"`TODOs.org` had a snippet in the middle of the file where a line started "
+"with `#!/bin/sh`."
+msgstr ""
+
+msgid ""
+"So what we actually want is to match the **first** line against the pattern."
+" We could loop through each file, get the first line with `head -n 1` and "
+"grep against that, but this is starting to look messy. I bet there is "
+"another way of doing it concisely..."
+msgstr ""
+
+msgid ""
+"Let's try Awk. I need a way to select the line numbers to replace `head -n "
+"1`, and to stop processing the file if the pattern matches. A quick search "
+"points me to using `FNR` for the former, and `{ nextline }` for the latter. "
+"Let's try it:"
+msgstr ""
+
+msgid ""
+"$ git ls-files | xargs awk 'FNR>1 { nextfile } /^#!\\// { print FILENAME; nextfile }'\n"
+"bootstrap\n"
+"build-aux/with-guile-env.in\n"
+"old/scripts/assert-docs-spelling.sh\n"
+"old/scripts/build-site.sh\n"
+"old/scripts/builder.bats.sh\n"
+"scripts/assert-shellcheck.sh\n"
+"scripts/assert-todos.sh\n"
+"scripts/ci-build.sh\n"
+"scripts/compile-readme.sh\n"
+"scripts/generate-tasks-and-bugs.sh\n"
+"scripts/songbooks.in\n"
+"scripts/with-container.sh\n"
+msgstr ""
+
+msgid ""
+"Great! Only `TODOs.org` is missing, but the script is much better: instead "
+"of matching against any part of the file that may have a shebang-like line, "
+"we only look for the first. Let's put it back into the `assert-"
+"shellcheck.sh` file and use `NULL` for separators to accommodate files with "
+"spaces in the name:"
+msgstr ""
+
+msgid ""
+"#!/usr/sh\n"
+"set -eu\n"
+"\n"
+"git ls-files -z | \\\n"
+" xargs -0 awk 'FNR>1 { nextfile } /^#!\\// { print FILENAME; nextfile }' | \\\n"
+" xargs shellcheck\n"
+msgstr ""
+
+msgid ""
+"This is where I've stopped, but I imagine a likely improvement: match "
+"against only `#!/bin/sh` and `#!/usr/bin/env bash` shebangs (the ones I use "
+"most), to avoid running ShellCheck on Perl files, or other shebangs."
+msgstr ""
+
+msgid ""
+"Also when reviewing the text of this article, I found that `{ nextfile }` is"
+" a GNU Awk extension. It would be an improvement if `assert-shellcheck.sh` "
+"relied on the POSIX subset of Awk for working correctly."
+msgstr ""
+
+msgid "title: 'Awk snippet: ShellCheck all scripts in a repository'"
+msgstr ""
+
+msgid "date: 2020-12-15"
+msgstr ""
+
+msgid "layout: post"
+msgstr ""
+
+msgid "lang: en"
+msgstr ""
+
+msgid "ref: awk-snippet-shellcheck-all-scripts-in-a-repository"
+msgstr ""
+
+#~ msgid ""
+#~ "title: 'Awk snippet: ShellCheck all scripts in a repository'\n"
+#~ "date: 2020-12-15\n"
+#~ "layout: post\n"
+#~ "lang: en\n"
+#~ "ref: awk-snippet-shellcheck-all-scripts-in-a-repository"
+#~ msgstr ""
diff --git a/locale/fr/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po b/locale/fr/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
index 1070e1b..7b2d4bd 100644
--- a/locale/fr/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
+++ b/locale/fr/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
@@ -2,11 +2,6 @@
msgid ""
msgstr ""
-msgid ""
-"[FIXED](https://discourse.nixos.org/t/inconsistent-hash-of-"
-"buildgomodule/3127/2)."
-msgstr ""
-
msgid "Offending derivation:"
msgstr ""
@@ -1067,6 +1062,16 @@ msgid ""
"repository](https://git.euandreh.xyz/vps/tree/default.nix?id=6ba76140238b5e3c7009c201f9f80ac86063f438#n3):"
msgstr ""
+msgid ""
+"FIXED: See https://discourse.nixos.org/t/inconsistent-hash-of-"
+"buildgomodule/3127/2"
+msgstr ""
+
+#~ msgid ""
+#~ "[FIXED](https://discourse.nixos.org/t/inconsistent-hash-of-"
+#~ "buildgomodule/3127/2)."
+#~ msgstr ""
+
#~ msgid ""
#~ "[Full source code on "
#~ "sr.ht](https://git.euandreh.xyz/vps/tree/default.nix?id=6ba76140238b5e3c7009c201f9f80ac86063f438#n3):"
diff --git a/locale/fr/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po b/locale/fr/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po
new file mode 100644
index 0000000..084c259
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po
@@ -0,0 +1,93 @@
+#
+msgid ""
+msgstr ""
+
+msgid ""
+"title: Failure with relocatable Guix pack tarball\n"
+"date: 2020-12-15\n"
+"layout: pastebin\n"
+"lang: en"
+msgstr ""
+
+msgid "FIXED: Use `GUIX_PROFILE= source etc/profile`"
+msgstr ""
+
+msgid ""
+"The example from the [blog post](https://guix.gnu.org/blog/2018/tarballs-"
+"the-ultimate-container-image-format/) fails."
+msgstr ""
+
+msgid ""
+"$ tar xf `guix pack --relocatable -S /bin=bin -S /etc=etc guile gnutls guile-json`\n"
+"$ source etc/profile\n"
+"$ bin/guile -c '(use-modules (json))'\n"
+"guile: warning: failed to install locale\n"
+"Backtrace:\n"
+"In ice-9/boot-9.scm:\n"
+" 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)\n"
+"In unknown file:\n"
+" 12 (apply-smob/0 #<thunk 7f9d240ca740>)\n"
+"In ice-9/boot-9.scm:\n"
+" 718:2 11 (call-with-prompt (\"prompt\") #<procedure 7f9d240db740 ?> ?)\n"
+"In ice-9/eval.scm:\n"
+" 619:8 10 (_ #(#(#<directory (guile-user) 7f9d23d00f00>)))\n"
+"In ice-9/command-line.scm:\n"
+" 185:18 9 (_ #<input: string 7f9d23cfaa10>)\n"
+"In unknown file:\n"
+" 8 (eval (use-modules (json)) #<directory (guile-user) 7f9?>)\n"
+"In ice-9/eval.scm:\n"
+" 721:20 7 (primitive-eval (use-modules (json)))\n"
+"In ice-9/psyntax.scm:\n"
+" 1241:36 6 (expand-top-sequence ((use-modules (json))) _ _ #f _ _ _)\n"
+" 1233:19 5 (parse _ ((\"placeholder\" placeholder)) ((top) #(# # ?)) ?)\n"
+" 285:10 4 (parse _ ((\"placeholder\" placeholder)) (()) _ c&e (eval) ?)\n"
+"In ice-9/boot-9.scm:\n"
+" 3898:20 3 (process-use-modules _)\n"
+" 222:17 2 (map1 (((json))))\n"
+" 3899:31 1 (_ ((json)))\n"
+" 3300:6 0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?)\n"
+"\n"
+"ice-9/boot-9.scm:3300:6: In procedure resolve-interface:\n"
+"no code for module (json)\n"
+"$ bin/guile -c '(use-modules (gnutls))'\n"
+"guile: warning: failed to install locale\n"
+"Backtrace:\n"
+"In ice-9/boot-9.scm:\n"
+" 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)\n"
+"In unknown file:\n"
+" 12 (apply-smob/0 #<thunk 7f7fe607a7c0>)\n"
+"In ice-9/boot-9.scm:\n"
+" 718:2 11 (call-with-prompt (\"prompt\") #<procedure 7f7fe6085940 ?> ?)\n"
+"In ice-9/eval.scm:\n"
+" 619:8 10 (_ #(#(#<directory (guile-user) 7f7fe5ca8f00>)))\n"
+"In ice-9/command-line.scm:\n"
+" 185:18 9 (_ #<input: string 7f7fe5ca2a10>)\n"
+"In unknown file:\n"
+" 8 (eval (use-modules (gnutls)) #<directory (guile-user) 7?>)\n"
+"In ice-9/eval.scm:\n"
+" 721:20 7 (primitive-eval (use-modules (gnutls)))\n"
+"In ice-9/psyntax.scm:\n"
+" 1241:36 6 (expand-top-sequence ((use-modules (gnutls))) _ _ #f _ _ ?)\n"
+" 1233:19 5 (parse _ ((\"placeholder\" placeholder)) ((top) #(# # ?)) ?)\n"
+" 285:10 4 (parse _ ((\"placeholder\" placeholder)) (()) _ c&e (eval) ?)\n"
+"In ice-9/boot-9.scm:\n"
+" 3898:20 3 (process-use-modules _)\n"
+" 222:17 2 (map1 (((gnutls))))\n"
+" 3899:31 1 (_ ((gnutls)))\n"
+" 3300:6 0 (resolve-interface (gnutls) #:select _ #:hide _ #:prefix ?)\n"
+"\n"
+"ice-9/boot-9.scm:3300:6: In procedure resolve-interface:\n"
+"no code for module (gnutls)\n"
+msgstr ""
+
+msgid "My Guix version if fairly recent:"
+msgstr ""
+
+msgid ""
+"$ guix describe\n"
+"Génération 83 14 déc. 2020 00:28:16 (actuelle)\n"
+" guix 41807eb\n"
+" URL du dépôt : https://git.savannah.gnu.org/git/guix.git\n"
+" branche: master\n"
+" commit : 41807eb5329299b8c45cd49356a4ead01ce0d469\n"
+msgstr ""
diff --git a/locale/fr/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po b/locale/fr/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po
new file mode 100644
index 0000000..8c55368
--- /dev/null
+++ b/locale/fr/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po
@@ -0,0 +1,192 @@
+#
+msgid ""
+msgstr ""
+
+msgid ""
+"Inspired by Fred Herbert's \"[Awk in 20 Minutes](https://ferd.ca/awk-"
+"in-20-minutes.html)\", here's a problem I just solved with a line of Awk: "
+"run ShellCheck in all scripts of a repository."
+msgstr ""
+
+msgid ""
+"In my repositories I usually have Bash and POSIX scripts, which I want to "
+"keep tidy with [ShellCheck](https://www.shellcheck.net/). Here's the first "
+"version of `assert-shellcheck.sh`:"
+msgstr ""
+
+msgid ""
+"#!/bin/sh\n"
+"set -eu\n"
+"\n"
+"find . -type f -name '*.sh' -print0 | xargs -0 shellcheck\n"
+msgstr ""
+
+msgid ""
+"This is the type of script that I copy around to all repositories, and I "
+"want it to be capable of working on any repository, without requiring a list"
+" of files to run ShellCheck on."
+msgstr ""
+
+msgid ""
+"This first version worked fine, as all my scripts had the '.sh' ending. But "
+"I recently added some scripts without any extension, so `assert-"
+"shellcheck.sh` called for a second version. The first attempt was to try "
+"grepping the shebang line:"
+msgstr ""
+
+msgid ""
+"$ grep '^#!/' assert-shellcheck.sh\n"
+"#!/usr/sh\n"
+msgstr ""
+
+msgid ""
+"Good, we have a grep pattern on the first try. Let's try to find all the "
+"matching files:"
+msgstr ""
+
+msgid ""
+"$ find . -type f | xargs grep -l '^#!/'\n"
+"./TODOs.org\n"
+"./.git/hooks/pre-commit.sample\n"
+"./.git/hooks/pre-push.sample\n"
+"./.git/hooks/pre-merge-commit.sample\n"
+"./.git/hooks/fsmonitor-watchman.sample\n"
+"./.git/hooks/pre-applypatch.sample\n"
+"./.git/hooks/pre-push\n"
+"./.git/hooks/prepare-commit-msg.sample\n"
+"./.git/hooks/commit-msg.sample\n"
+"./.git/hooks/post-update.sample\n"
+"./.git/hooks/pre-receive.sample\n"
+"./.git/hooks/applypatch-msg.sample\n"
+"./.git/hooks/pre-rebase.sample\n"
+"./.git/hooks/update.sample\n"
+"./build-aux/with-guile-env.in\n"
+"./build-aux/test-driver\n"
+"./build-aux/missing\n"
+"./build-aux/install-sh\n"
+"./build-aux/install-sh~\n"
+"./bootstrap\n"
+"./scripts/assert-todos.sh\n"
+"./scripts/songbooks\n"
+"./scripts/compile-readme.sh\n"
+"./scripts/ci-build.sh\n"
+"./scripts/generate-tasks-and-bugs.sh\n"
+"./scripts/songbooks.in\n"
+"./scripts/with-container.sh\n"
+"./scripts/assert-shellcheck.sh\n"
+msgstr ""
+
+msgid ""
+"This approach has a problem, though: it includes files ignored by Git, such "
+"as `builld-aux/install-sh~`, and even goes into the `.git/` directory and "
+"finds sample hooks in `.git/hooks/*`."
+msgstr ""
+
+msgid "To list the files that Git is tracking we'll try `git ls-files`:"
+msgstr ""
+
+msgid ""
+"$ git ls-files | xargs grep -l '^#!/'\n"
+"TODOs.org\n"
+"bootstrap\n"
+"build-aux/with-guile-env.in\n"
+"old/scripts/assert-docs-spelling.sh\n"
+"old/scripts/build-site.sh\n"
+"old/scripts/builder.bats.sh\n"
+"scripts/assert-shellcheck.sh\n"
+"scripts/assert-todos.sh\n"
+"scripts/ci-build.sh\n"
+"scripts/compile-readme.sh\n"
+"scripts/generate-tasks-and-bugs.sh\n"
+"scripts/songbooks.in\n"
+"scripts/with-container.sh\n"
+msgstr ""
+
+msgid ""
+"It looks to be almost there, but the `TODOs.org` entry shows a flaw in it: "
+"grep is looking for a `'^#!/'` pattern on any part of the file. In my case, "
+"`TODOs.org` had a snippet in the middle of the file where a line started "
+"with `#!/bin/sh`."
+msgstr ""
+
+msgid ""
+"So what we actually want is to match the **first** line against the pattern."
+" We could loop through each file, get the first line with `head -n 1` and "
+"grep against that, but this is starting to look messy. I bet there is "
+"another way of doing it concisely..."
+msgstr ""
+
+msgid ""
+"Let's try Awk. I need a way to select the line numbers to replace `head -n "
+"1`, and to stop processing the file if the pattern matches. A quick search "
+"points me to using `FNR` for the former, and `{ nextline }` for the latter. "
+"Let's try it:"
+msgstr ""
+
+msgid ""
+"$ git ls-files | xargs awk 'FNR>1 { nextfile } /^#!\\// { print FILENAME; nextfile }'\n"
+"bootstrap\n"
+"build-aux/with-guile-env.in\n"
+"old/scripts/assert-docs-spelling.sh\n"
+"old/scripts/build-site.sh\n"
+"old/scripts/builder.bats.sh\n"
+"scripts/assert-shellcheck.sh\n"
+"scripts/assert-todos.sh\n"
+"scripts/ci-build.sh\n"
+"scripts/compile-readme.sh\n"
+"scripts/generate-tasks-and-bugs.sh\n"
+"scripts/songbooks.in\n"
+"scripts/with-container.sh\n"
+msgstr ""
+
+msgid ""
+"Great! Only `TODOs.org` is missing, but the script is much better: instead "
+"of matching against any part of the file that may have a shebang-like line, "
+"we only look for the first. Let's put it back into the `assert-"
+"shellcheck.sh` file and use `NULL` for separators to accommodate files with "
+"spaces in the name:"
+msgstr ""
+
+msgid ""
+"#!/usr/sh\n"
+"set -eu\n"
+"\n"
+"git ls-files -z | \\\n"
+" xargs -0 awk 'FNR>1 { nextfile } /^#!\\// { print FILENAME; nextfile }' | \\\n"
+" xargs shellcheck\n"
+msgstr ""
+
+msgid ""
+"This is where I've stopped, but I imagine a likely improvement: match "
+"against only `#!/bin/sh` and `#!/usr/bin/env bash` shebangs (the ones I use "
+"most), to avoid running ShellCheck on Perl files, or other shebangs."
+msgstr ""
+
+msgid ""
+"Also when reviewing the text of this article, I found that `{ nextfile }` is"
+" a GNU Awk extension. It would be an improvement if `assert-shellcheck.sh` "
+"relied on the POSIX subset of Awk for working correctly."
+msgstr ""
+
+msgid "title: 'Awk snippet: ShellCheck all scripts in a repository'"
+msgstr ""
+
+msgid "date: 2020-12-15"
+msgstr ""
+
+msgid "layout: post"
+msgstr ""
+
+msgid "lang: en"
+msgstr ""
+
+msgid "ref: awk-snippet-shellcheck-all-scripts-in-a-repository"
+msgstr ""
+
+#~ msgid ""
+#~ "title: 'Awk snippet: ShellCheck all scripts in a repository'\n"
+#~ "date: 2020-12-15\n"
+#~ "layout: post\n"
+#~ "lang: en\n"
+#~ "ref: awk-snippet-shellcheck-all-scripts-in-a-repository"
+#~ msgstr ""
diff --git a/locale/pt/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po b/locale/pt/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
index 1070e1b..7b2d4bd 100644
--- a/locale/pt/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
+++ b/locale/pt/LC_MESSAGES/_pastebins/2019-06-08-inconsistent-hash-of-buildgomodule.po
@@ -2,11 +2,6 @@
msgid ""
msgstr ""
-msgid ""
-"[FIXED](https://discourse.nixos.org/t/inconsistent-hash-of-"
-"buildgomodule/3127/2)."
-msgstr ""
-
msgid "Offending derivation:"
msgstr ""
@@ -1067,6 +1062,16 @@ msgid ""
"repository](https://git.euandreh.xyz/vps/tree/default.nix?id=6ba76140238b5e3c7009c201f9f80ac86063f438#n3):"
msgstr ""
+msgid ""
+"FIXED: See https://discourse.nixos.org/t/inconsistent-hash-of-"
+"buildgomodule/3127/2"
+msgstr ""
+
+#~ msgid ""
+#~ "[FIXED](https://discourse.nixos.org/t/inconsistent-hash-of-"
+#~ "buildgomodule/3127/2)."
+#~ msgstr ""
+
#~ msgid ""
#~ "[Full source code on "
#~ "sr.ht](https://git.euandreh.xyz/vps/tree/default.nix?id=6ba76140238b5e3c7009c201f9f80ac86063f438#n3):"
diff --git a/locale/pt/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po b/locale/pt/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po
new file mode 100644
index 0000000..084c259
--- /dev/null
+++ b/locale/pt/LC_MESSAGES/_pastebins/2020-12-15-failure-with-relocatable-guix-pack-tarball.po
@@ -0,0 +1,93 @@
+#
+msgid ""
+msgstr ""
+
+msgid ""
+"title: Failure with relocatable Guix pack tarball\n"
+"date: 2020-12-15\n"
+"layout: pastebin\n"
+"lang: en"
+msgstr ""
+
+msgid "FIXED: Use `GUIX_PROFILE= source etc/profile`"
+msgstr ""
+
+msgid ""
+"The example from the [blog post](https://guix.gnu.org/blog/2018/tarballs-"
+"the-ultimate-container-image-format/) fails."
+msgstr ""
+
+msgid ""
+"$ tar xf `guix pack --relocatable -S /bin=bin -S /etc=etc guile gnutls guile-json`\n"
+"$ source etc/profile\n"
+"$ bin/guile -c '(use-modules (json))'\n"
+"guile: warning: failed to install locale\n"
+"Backtrace:\n"
+"In ice-9/boot-9.scm:\n"
+" 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)\n"
+"In unknown file:\n"
+" 12 (apply-smob/0 #<thunk 7f9d240ca740>)\n"
+"In ice-9/boot-9.scm:\n"
+" 718:2 11 (call-with-prompt (\"prompt\") #<procedure 7f9d240db740 ?> ?)\n"
+"In ice-9/eval.scm:\n"
+" 619:8 10 (_ #(#(#<directory (guile-user) 7f9d23d00f00>)))\n"
+"In ice-9/command-line.scm:\n"
+" 185:18 9 (_ #<input: string 7f9d23cfaa10>)\n"
+"In unknown file:\n"
+" 8 (eval (use-modules (json)) #<directory (guile-user) 7f9?>)\n"
+"In ice-9/eval.scm:\n"
+" 721:20 7 (primitive-eval (use-modules (json)))\n"
+"In ice-9/psyntax.scm:\n"
+" 1241:36 6 (expand-top-sequence ((use-modules (json))) _ _ #f _ _ _)\n"
+" 1233:19 5 (parse _ ((\"placeholder\" placeholder)) ((top) #(# # ?)) ?)\n"
+" 285:10 4 (parse _ ((\"placeholder\" placeholder)) (()) _ c&e (eval) ?)\n"
+"In ice-9/boot-9.scm:\n"
+" 3898:20 3 (process-use-modules _)\n"
+" 222:17 2 (map1 (((json))))\n"
+" 3899:31 1 (_ ((json)))\n"
+" 3300:6 0 (resolve-interface (json) #:select _ #:hide _ #:prefix _ ?)\n"
+"\n"
+"ice-9/boot-9.scm:3300:6: In procedure resolve-interface:\n"
+"no code for module (json)\n"
+"$ bin/guile -c '(use-modules (gnutls))'\n"
+"guile: warning: failed to install locale\n"
+"Backtrace:\n"
+"In ice-9/boot-9.scm:\n"
+" 1736:10 13 (with-exception-handler _ _ #:unwind? _ # _)\n"
+"In unknown file:\n"
+" 12 (apply-smob/0 #<thunk 7f7fe607a7c0>)\n"
+"In ice-9/boot-9.scm:\n"
+" 718:2 11 (call-with-prompt (\"prompt\") #<procedure 7f7fe6085940 ?> ?)\n"
+"In ice-9/eval.scm:\n"
+" 619:8 10 (_ #(#(#<directory (guile-user) 7f7fe5ca8f00>)))\n"
+"In ice-9/command-line.scm:\n"
+" 185:18 9 (_ #<input: string 7f7fe5ca2a10>)\n"
+"In unknown file:\n"
+" 8 (eval (use-modules (gnutls)) #<directory (guile-user) 7?>)\n"
+"In ice-9/eval.scm:\n"
+" 721:20 7 (primitive-eval (use-modules (gnutls)))\n"
+"In ice-9/psyntax.scm:\n"
+" 1241:36 6 (expand-top-sequence ((use-modules (gnutls))) _ _ #f _ _ ?)\n"
+" 1233:19 5 (parse _ ((\"placeholder\" placeholder)) ((top) #(# # ?)) ?)\n"
+" 285:10 4 (parse _ ((\"placeholder\" placeholder)) (()) _ c&e (eval) ?)\n"
+"In ice-9/boot-9.scm:\n"
+" 3898:20 3 (process-use-modules _)\n"
+" 222:17 2 (map1 (((gnutls))))\n"
+" 3899:31 1 (_ ((gnutls)))\n"
+" 3300:6 0 (resolve-interface (gnutls) #:select _ #:hide _ #:prefix ?)\n"
+"\n"
+"ice-9/boot-9.scm:3300:6: In procedure resolve-interface:\n"
+"no code for module (gnutls)\n"
+msgstr ""
+
+msgid "My Guix version if fairly recent:"
+msgstr ""
+
+msgid ""
+"$ guix describe\n"
+"Génération 83 14 déc. 2020 00:28:16 (actuelle)\n"
+" guix 41807eb\n"
+" URL du dépôt : https://git.savannah.gnu.org/git/guix.git\n"
+" branche: master\n"
+" commit : 41807eb5329299b8c45cd49356a4ead01ce0d469\n"
+msgstr ""
diff --git a/locale/pt/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po b/locale/pt/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po
new file mode 100644
index 0000000..8c55368
--- /dev/null
+++ b/locale/pt/LC_MESSAGES/_tils/2020-12-15-awk-snippet-shellcheck-all-scripts-in-a-repository.po
@@ -0,0 +1,192 @@
+#
+msgid ""
+msgstr ""
+
+msgid ""
+"Inspired by Fred Herbert's \"[Awk in 20 Minutes](https://ferd.ca/awk-"
+"in-20-minutes.html)\", here's a problem I just solved with a line of Awk: "
+"run ShellCheck in all scripts of a repository."
+msgstr ""
+
+msgid ""
+"In my repositories I usually have Bash and POSIX scripts, which I want to "
+"keep tidy with [ShellCheck](https://www.shellcheck.net/). Here's the first "
+"version of `assert-shellcheck.sh`:"
+msgstr ""
+
+msgid ""
+"#!/bin/sh\n"
+"set -eu\n"
+"\n"
+"find . -type f -name '*.sh' -print0 | xargs -0 shellcheck\n"
+msgstr ""
+
+msgid ""
+"This is the type of script that I copy around to all repositories, and I "
+"want it to be capable of working on any repository, without requiring a list"
+" of files to run ShellCheck on."
+msgstr ""
+
+msgid ""
+"This first version worked fine, as all my scripts had the '.sh' ending. But "
+"I recently added some scripts without any extension, so `assert-"
+"shellcheck.sh` called for a second version. The first attempt was to try "
+"grepping the shebang line:"
+msgstr ""
+
+msgid ""
+"$ grep '^#!/' assert-shellcheck.sh\n"
+"#!/usr/sh\n"
+msgstr ""
+
+msgid ""
+"Good, we have a grep pattern on the first try. Let's try to find all the "
+"matching files:"
+msgstr ""
+
+msgid ""
+"$ find . -type f | xargs grep -l '^#!/'\n"
+"./TODOs.org\n"
+"./.git/hooks/pre-commit.sample\n"
+"./.git/hooks/pre-push.sample\n"
+"./.git/hooks/pre-merge-commit.sample\n"
+"./.git/hooks/fsmonitor-watchman.sample\n"
+"./.git/hooks/pre-applypatch.sample\n"
+"./.git/hooks/pre-push\n"
+"./.git/hooks/prepare-commit-msg.sample\n"
+"./.git/hooks/commit-msg.sample\n"
+"./.git/hooks/post-update.sample\n"
+"./.git/hooks/pre-receive.sample\n"
+"./.git/hooks/applypatch-msg.sample\n"
+"./.git/hooks/pre-rebase.sample\n"
+"./.git/hooks/update.sample\n"
+"./build-aux/with-guile-env.in\n"
+"./build-aux/test-driver\n"
+"./build-aux/missing\n"
+"./build-aux/install-sh\n"
+"./build-aux/install-sh~\n"
+"./bootstrap\n"
+"./scripts/assert-todos.sh\n"
+"./scripts/songbooks\n"
+"./scripts/compile-readme.sh\n"
+"./scripts/ci-build.sh\n"
+"./scripts/generate-tasks-and-bugs.sh\n"
+"./scripts/songbooks.in\n"
+"./scripts/with-container.sh\n"
+"./scripts/assert-shellcheck.sh\n"
+msgstr ""
+
+msgid ""
+"This approach has a problem, though: it includes files ignored by Git, such "
+"as `builld-aux/install-sh~`, and even goes into the `.git/` directory and "
+"finds sample hooks in `.git/hooks/*`."
+msgstr ""
+
+msgid "To list the files that Git is tracking we'll try `git ls-files`:"
+msgstr ""
+
+msgid ""
+"$ git ls-files | xargs grep -l '^#!/'\n"
+"TODOs.org\n"
+"bootstrap\n"
+"build-aux/with-guile-env.in\n"
+"old/scripts/assert-docs-spelling.sh\n"
+"old/scripts/build-site.sh\n"
+"old/scripts/builder.bats.sh\n"
+"scripts/assert-shellcheck.sh\n"
+"scripts/assert-todos.sh\n"
+"scripts/ci-build.sh\n"
+"scripts/compile-readme.sh\n"
+"scripts/generate-tasks-and-bugs.sh\n"
+"scripts/songbooks.in\n"
+"scripts/with-container.sh\n"
+msgstr ""
+
+msgid ""
+"It looks to be almost there, but the `TODOs.org` entry shows a flaw in it: "
+"grep is looking for a `'^#!/'` pattern on any part of the file. In my case, "
+"`TODOs.org` had a snippet in the middle of the file where a line started "
+"with `#!/bin/sh`."
+msgstr ""
+
+msgid ""
+"So what we actually want is to match the **first** line against the pattern."
+" We could loop through each file, get the first line with `head -n 1` and "
+"grep against that, but this is starting to look messy. I bet there is "
+"another way of doing it concisely..."
+msgstr ""
+
+msgid ""
+"Let's try Awk. I need a way to select the line numbers to replace `head -n "
+"1`, and to stop processing the file if the pattern matches. A quick search "
+"points me to using `FNR` for the former, and `{ nextline }` for the latter. "
+"Let's try it:"
+msgstr ""
+
+msgid ""
+"$ git ls-files | xargs awk 'FNR>1 { nextfile } /^#!\\// { print FILENAME; nextfile }'\n"
+"bootstrap\n"
+"build-aux/with-guile-env.in\n"
+"old/scripts/assert-docs-spelling.sh\n"
+"old/scripts/build-site.sh\n"
+"old/scripts/builder.bats.sh\n"
+"scripts/assert-shellcheck.sh\n"
+"scripts/assert-todos.sh\n"
+"scripts/ci-build.sh\n"
+"scripts/compile-readme.sh\n"
+"scripts/generate-tasks-and-bugs.sh\n"
+"scripts/songbooks.in\n"
+"scripts/with-container.sh\n"
+msgstr ""
+
+msgid ""
+"Great! Only `TODOs.org` is missing, but the script is much better: instead "
+"of matching against any part of the file that may have a shebang-like line, "
+"we only look for the first. Let's put it back into the `assert-"
+"shellcheck.sh` file and use `NULL` for separators to accommodate files with "
+"spaces in the name:"
+msgstr ""
+
+msgid ""
+"#!/usr/sh\n"
+"set -eu\n"
+"\n"
+"git ls-files -z | \\\n"
+" xargs -0 awk 'FNR>1 { nextfile } /^#!\\// { print FILENAME; nextfile }' | \\\n"
+" xargs shellcheck\n"
+msgstr ""
+
+msgid ""
+"This is where I've stopped, but I imagine a likely improvement: match "
+"against only `#!/bin/sh` and `#!/usr/bin/env bash` shebangs (the ones I use "
+"most), to avoid running ShellCheck on Perl files, or other shebangs."
+msgstr ""
+
+msgid ""
+"Also when reviewing the text of this article, I found that `{ nextfile }` is"
+" a GNU Awk extension. It would be an improvement if `assert-shellcheck.sh` "
+"relied on the POSIX subset of Awk for working correctly."
+msgstr ""
+
+msgid "title: 'Awk snippet: ShellCheck all scripts in a repository'"
+msgstr ""
+
+msgid "date: 2020-12-15"
+msgstr ""
+
+msgid "layout: post"
+msgstr ""
+
+msgid "lang: en"
+msgstr ""
+
+msgid "ref: awk-snippet-shellcheck-all-scripts-in-a-repository"
+msgstr ""
+
+#~ msgid ""
+#~ "title: 'Awk snippet: ShellCheck all scripts in a repository'\n"
+#~ "date: 2020-12-15\n"
+#~ "layout: post\n"
+#~ "lang: en\n"
+#~ "ref: awk-snippet-shellcheck-all-scripts-in-a-repository"
+#~ msgstr ""