swtpm/tests/sed-inplace
Stefan Berger f122f14a56 test: Wrap sed -i in sed-inplace
Since there is a BSD variant of sed that requires a parameter for the -i
option provide a sed-inplace wrapper script.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2024-09-13 16:02:58 -04:00

8 lines
119 B
Bash
Executable File

#!/usr/bin/env bash
if [[ "$(uname -s)" =~ (Linux|CYGWIN_NT-) ]]; then
sed -i "$1" "$2"
else
sed -i '' "$1" "$2"
fi