git subrepo pull (merge) --force deps/libchdr
[pcsx_rearmed.git] / deps / libchdr / deps / zstd-1.5.5 / tests / cli-tests / common / platform.sh
1 #!/bin/sh
2
3 UNAME=$(uname)
4
5 isWindows=false
6 INTOVOID="/dev/null"
7 case "$UNAME" in
8   GNU) DEVDEVICE="/dev/random" ;;
9   *) DEVDEVICE="/dev/zero" ;;
10 esac
11 case "$OS" in
12   Windows*)
13     isWindows=true
14     INTOVOID="NUL"
15     DEVDEVICE="NUL"
16     ;;
17 esac
18
19 case "$UNAME" in
20   Darwin) MD5SUM="md5 -r" ;;
21   FreeBSD) MD5SUM="gmd5sum" ;;
22   NetBSD) MD5SUM="md5 -n" ;;
23   OpenBSD) MD5SUM="md5" ;;
24   *) MD5SUM="md5sum" ;;
25 esac
26
27 DIFF="diff"
28 case "$UNAME" in
29   SunOS) DIFF="gdiff" ;;
30 esac
31
32 if echo hello | zstd -v -T2 2>&1 > $INTOVOID | grep -q 'multi-threading is disabled'
33 then
34     hasMT=""
35 else
36     hasMT="true"
37 fi