Patch-Source: https://codeberg.org/TotallyLeGIT/doasedit/commit/3aac1aa32dc7c7ea51e2d7692c5bb5b711aba1a8 -- From 3aac1aa32dc7c7ea51e2d7692c5bb5b711aba1a8 Mon Sep 17 00:00:00 2001 From: TotallyLeGIT <> Date: Wed, 3 May 2023 10:35:33 +0200 Subject: [PATCH] Remove `--suffix` option from `mktemp` `mktemp --suffix` needs GNU coreutils. This commit increases portability by removing the `--suffix` option while keeping functionality exactly the same. Fixes #6 --- CHANGELOG.md | 1 + doasedit | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doasedit b/doasedit index 6547aa0..4d5cc6f 100755 --- a/doasedit +++ b/doasedit @@ -114,8 +114,8 @@ tmpdir="$(mktemp -dt 'doasedit-XXXXXX')" for file; do unset exists readable writable - tmpfile="$(mktemp --suffix="-${file##*/}" "${tmpdir}/XXXX")" - tmpfile_copy="$(mktemp --suffix="-copy-of-${file##*/}" "${tmpdir}/XXXX")" + tmpfile="$(mktemp "${tmpdir}/XXXX-${file##*/}")" + tmpfile_copy="$(mktemp "${tmpdir}/XXXX-copy-of-${file##*/}")" dir="$(dirname -- "${file}")" if [ -e "${file}" ]; then