scripts/winefps: Refactor
parent
1cea748196
commit
8b0a1a46bd
|
@ -9,16 +9,16 @@ EOF
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if ! command -v osd_cat >/dev/null; then
|
if ! command -v osd_cat >/dev/null 2>&1; then
|
||||||
echo >&2 "You need osd_cat."
|
echo >&2 "osd_cat not found in path."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
## The unbuffered option is -u on GNU and OpenBSD, -l on others.
|
## The unbuffered option is -u on GNU and OpenBSD, -l on others.
|
||||||
OPT_UNBUF=-l
|
OPT_UNBUF=-l
|
||||||
if [ "$(uname)" = "Linux" ] || [ "$(uname)" = "OpenBSD" ]; then
|
case "$(uname)" in
|
||||||
OPT_UNBUF=-u
|
Linux|OpenBSD) OPT_UNBUF=-u ;;
|
||||||
fi
|
esac
|
||||||
|
|
||||||
WINEDEBUG=fps wine "$@" 2>&1 | tee /dev/stderr | \
|
WINEDEBUG=fps wine "$@" 2>&1 | tee /dev/stderr | \
|
||||||
sed $OPT_UNBUF -n '/^trace:fps:/{s/.* \([^ ]*\)fps/\1/;p}' | \
|
sed $OPT_UNBUF -n '/^trace:fps:/{s/.* \([^ ]*\)fps/\1/;p}' | \
|
||||||
|
|
Loading…
Reference in New Issue