aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-20 23:29:42 -0300
committerEuAndreh <eu@euandre.org>2022-01-20 23:29:42 -0300
commit7bb30b4d8ec7fdb24b23b02f04897d9b0480056f (patch)
treeda43640e508355eb73a3492e79546a312b1cf66d
parentaux/workflow/TODOs.sh: Fix catenation of aux/workflow/preamble.md (diff)
downloadgit-permalink-7bb30b4d8ec7fdb24b23b02f04897d9b0480056f.tar.gz
git-permalink-7bb30b4d8ec7fdb24b23b02f04897d9b0480056f.tar.xz
Add diacritic and spaces to mk{s,d}temp paths to enforce that everything works with it
-rw-r--r--Makefile27
-rwxr-xr-xaux/lib.sh3
-rwxr-xr-xaux/workflow/dist.sh2
-rwxr-xr-xsrc/git-permalink.in2
-rwxr-xr-xtests/lib.sh3
5 files changed, 19 insertions, 18 deletions
diff --git a/Makefile b/Makefile
index 9d1157b..2d094a0 100644
--- a/Makefile
+++ b/Makefile
@@ -66,27 +66,27 @@ clean:
install: all
mkdir -p \
- $(DESTDIR)$(BINDIR) \
- $(DESTDIR)$(LIBEXECDIR)/$(NAME) \
- $(DESTDIR)$(LOCALEDIR)
- cp src/$(NAME) $(DESTDIR)$(BINDIR)
- cp src/locale/load-messages.sh $(DESTDIR)$(LIBEXECDIR)/$(NAME)
+ '$(DESTDIR)$(BINDIR)' \
+ '$(DESTDIR)$(LIBEXECDIR)/$(NAME)' \
+ '$(DESTDIR)$(LOCALEDIR)'
+ cp src/$(NAME) '$(DESTDIR)$(BINDIR)'
+ cp src/locale/load-messages.sh '$(DESTDIR)$(LIBEXECDIR)/$(NAME)'
for l in $(TRANSLATIONS) en $(CONTRIBLANGS); do \
- mkdir -p $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME); \
+ mkdir -p '$(DESTDIR)$(LOCALEDIR)/'$$l'/LC_MESSAGES/$(NAME)'; \
cp \
src/locale/$$l.sh src/locale/*.$$l.txt \
- $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME); \
+ '$(DESTDIR)$(LOCALEDIR)/'$$l'/LC_MESSAGES/$(NAME)'; \
done
- sh doc/manpages.sh -ip $(DESTDIR)$(MANDIR) $(manpages)
+ sh doc/manpages.sh -ip '$(DESTDIR)$(MANDIR)' $(manpages)
uninstall:
rm -f \
- $(DESTDIR)$(BINDIR)/$(NAME) \
- $(DESTDIR)$(LIBEXECDIR)/$(NAME)/load-messages.sh
+ '$(DESTDIR)$(BINDIR)/$(NAME)' \
+ '$(DESTDIR)$(LIBEXECDIR)/$(NAME)/load-messages.sh'
for l in $(TRANSLATIONS) en $(CONTRIBLANGS); do \
- rm -f $(DESTDIR)$(LOCALEDIR)/$$l/LC_MESSAGES/$(NAME)/*; \
+ rm -f '$(DESTDIR)$(LOCALEDIR)/'$$l'/LC_MESSAGES/$(NAME)'/*; \
done
- sh doc/manpages.sh -up $(DESTDIR)$(MANDIR) $(manpages)
+ sh doc/manpages.sh -up '$(DESTDIR)$(MANDIR)' $(manpages)
#
@@ -102,8 +102,7 @@ dev-check: check public
$(EXTRA_VERSION)
sh aux/workflow/assert-manpages.sh -n '$(NAME)' -m '$(MAILING_LIST)' \
-l '$(TRANSLATIONS) en' $(manpages.en.in)
- env ASSERT_NO_MISSING_TRANSLATIONS=1 sh aux/workflow/repocheck.sh \
- -x1 -l1 -f30
+ sh aux/workflow/repocheck.sh -x1 -l1 -f30
dist:
sh aux/workflow/dist.sh -d '$(DATE)' -V '$(VERSION)' -n '$(NAME)' \
diff --git a/aux/lib.sh b/aux/lib.sh
index b47812d..cfb59d7 100755
--- a/aux/lib.sh
+++ b/aux/lib.sh
@@ -13,7 +13,8 @@ uuid() {
}
tmpname() {
- echo 'mkstemp(template)' | m4 -D template="${TMPDIR:-/tmp}/m4-tmpname."
+ TEMPLATE="${TMPDIR:-/tmp}/m4-tmpname.diacritic á and spaces."
+ echo 'mkstemp(template)' | m4 -D template="$TEMPLATE"
}
mkstemp() {
diff --git a/aux/workflow/dist.sh b/aux/workflow/dist.sh
index 48a9d57..68f8849 100755
--- a/aux/workflow/dist.sh
+++ b/aux/workflow/dist.sh
@@ -81,7 +81,7 @@ if [ "Release $VVERSION" != "$(git log --format=%B -1 HEAD | head -n1)" ]; then
fi
make clean
-make dev-check EXTRA_VERSION="$VVERSION"
+env ASSERT_NO_MISSING_TRANSLATIONS=1 make dev-check EXTRA_VERSION="$VVERSION"
if ! (git diff --quiet && git diff --quiet --staged); then
echo 'Dirty repository.'
diff --git a/src/git-permalink.in b/src/git-permalink.in
index bb7a09e..0334ecb 100755
--- a/src/git-permalink.in
+++ b/src/git-permalink.in
@@ -64,7 +64,7 @@ dump_translatable_strings() {
EOF
for msg in $MSGS; do
# shellcheck disable=2016
- printf 'MSG_%s="$(cat @LOCALEDIR@/@LANG@/LC_MESSAGES/@NAME@/%s.@LANG@.txt)"\n' \
+ printf "MSG_%s=\"\$(cat '@LOCALEDIR@/@LANG@/LC_MESSAGES/@NAME@/%s.@LANG@.txt')\"\n" \
"$msg" "$msg"
done
}
diff --git a/tests/lib.sh b/tests/lib.sh
index f2d5555..0b4bf52 100755
--- a/tests/lib.sh
+++ b/tests/lib.sh
@@ -127,7 +127,8 @@ uuid() {
}
tmpname() {
- echo 'mkstemp(template)' | m4 -D template="${TMPDIR:-/tmp}/m4-tmpname."
+ TEMPLATE="${TMPDIR:-/tmp}/m4-tmpname.diacritic á and spaces."
+ echo 'mkstemp(template)' | m4 -D template="$TEMPLATE"
}
mkstemp() {