swtpm/tests/sed-inplace
Stefan Berger 4d2e967423 tests: Use proper command line options on GNU/Hurd systems
GNU/Hurd systems use the same sed/sha1sum/state command lines as Linux
and Cygwin.

Signed-off-by: Stefan Berger <stefanb@linux.ibm.com>
2025-04-28 20:38:14 -04:00

8 lines
123 B
Bash
Executable File

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