aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2022-01-20 23:32:37 -0300
committerEuAndreh <eu@euandre.org>2022-01-21 00:00:17 -0300
commitb4d4c2d50a5072b3c80483e6392fc2b686a355b0 (patch)
tree77bcad77cb4a99a9a5d2a3ab90633724c1118ab1
parentAdd diacritic and spaces to mk{s,d}temp paths to enforce that everything work... (diff)
downloadgit-permalink-b4d4c2d50a5072b3c80483e6392fc2b686a355b0.tar.gz
git-permalink-b4d4c2d50a5072b3c80483e6392fc2b686a355b0.tar.xz
{aux,tests}/lib.sh: Use UUIDs for tmpnames to remove dependency on m4
-rw-r--r--aux/containers/guix/manifest.scm1
-rwxr-xr-xaux/lib.sh3
-rwxr-xr-xtests/lib.sh3
3 files changed, 2 insertions, 5 deletions
diff --git a/aux/containers/guix/manifest.scm b/aux/containers/guix/manifest.scm
index cf9a6d7..32e4418 100644
--- a/aux/containers/guix/manifest.scm
+++ b/aux/containers/guix/manifest.scm
@@ -6,7 +6,6 @@
diffutils
grep
sed
- m4
git
tar
gawk
diff --git a/aux/lib.sh b/aux/lib.sh
index cfb59d7..47e4878 100755
--- a/aux/lib.sh
+++ b/aux/lib.sh
@@ -13,8 +13,7 @@ uuid() {
}
tmpname() {
- TEMPLATE="${TMPDIR:-/tmp}/m4-tmpname.diacritic á and spaces."
- echo 'mkstemp(template)' | m4 -D template="$TEMPLATE"
+ echo "${TMPDIR:-/tmp}/uuid-tmpname.diacritic á and spaces.$(uuid)"
}
mkstemp() {
diff --git a/tests/lib.sh b/tests/lib.sh
index 0b4bf52..15fe331 100755
--- a/tests/lib.sh
+++ b/tests/lib.sh
@@ -127,8 +127,7 @@ uuid() {
}
tmpname() {
- TEMPLATE="${TMPDIR:-/tmp}/m4-tmpname.diacritic á and spaces."
- echo 'mkstemp(template)' | m4 -D template="$TEMPLATE"
+ echo "${TMPDIR:-/tmp}/uuid-tmpname.diacritic á and spaces.$(uuid)"
}
mkstemp() {