From b4d4c2d50a5072b3c80483e6392fc2b686a355b0 Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 20 Jan 2022 23:32:37 -0300 Subject: {aux,tests}/lib.sh: Use UUIDs for tmpnames to remove dependency on m4 --- aux/containers/guix/manifest.scm | 1 - aux/lib.sh | 3 +-- tests/lib.sh | 3 +-- 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() { -- cgit v1.2.3