From 42354876de823f52a431eac900d360c074c6198d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 15 Jul 2021 14:56:58 -0300 Subject: aux/lib.sh: Add mkstemp and mkdtemp, and copy uuid over The tests were relying on the unspecified and non-standartized behaviour of "mktemp". Now they use "mkstemp()", a shim sh function to provide the expected behaviour, and an accompanying "mkdtemp()" function is also defined. To further decouple from specific implementations and OS-behaviours and quirks, a aux/lib.sh file containing both those functions was added. Its purpose is to also allow code under aux/ to not depend on specific behaviour. "mkdtemp()" had to be replicated in aux/ci/ci-build.sh, since it runs outside the repository. --- aux/workflow/assert-readme.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'aux/workflow/assert-readme.sh') diff --git a/aux/workflow/assert-readme.sh b/aux/workflow/assert-readme.sh index 99ec692..843fd86 100755 --- a/aux/workflow/assert-readme.sh +++ b/aux/workflow/assert-readme.sh @@ -2,6 +2,8 @@ set -eu TLD="$(cat aux/tld.txt)" +. aux/lib.sh + while getopts 'n:m:' flag; do case "$flag" in n) @@ -27,7 +29,7 @@ assert_arg() { assert_arg "${PROJECT:-}" '-n PROJECT' assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST' -EXPECTED="$(mktemp)" +EXPECTED="$(mkstemp)" cat <> "$EXPECTED" For running the extra development-only checks, run: @@ -57,7 +59,7 @@ Send contributions to the [mailing list] via [\`git send-email\`](https://git-se [mailing list]: https://lists.sr.ht/~euandreh/$MAILING_LIST?search=%5B$PROJECT%5D EOF -RELEASES_LIST="$(mktemp)" +RELEASES_LIST="$(mkstemp)" add_release() { DATE="$1" VVERSION="$2" -- cgit v1.2.3