mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 11:37:35 +00:00
99 lines
2.2 KiB
Text
99 lines
2.2 KiB
Text
|
#!/bin/sh
|
||
|
|
||
|
rm -f /tmp/wut-linux
|
||
|
|
||
|
(
|
||
|
grep -R "$1" ~/dox/susv4-2018/ | sed '
|
||
|
/meta.idx/d
|
||
|
' >/tmp/wut-posix
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/linux/include/ | sed '
|
||
|
/\/asm-/ {
|
||
|
/asm-\(x86\|generic\)/!d
|
||
|
}
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/\2\t\1/
|
||
|
' >>/tmp/wut-linux
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/linux-2.6.18/include/ | sed '
|
||
|
/\/asm-/ {
|
||
|
/asm-\(x86\|generic\)/!d
|
||
|
}
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/2.6.18\t\1/
|
||
|
' >>/tmp/wut-linux
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/xnu/ | sed '
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/\2\t\1/
|
||
|
' >/tmp/wut-xnu
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
{
|
||
|
if ! grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/freebsd/sys/; then
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/freebsd/lib/libc/
|
||
|
fi
|
||
|
} | sed '
|
||
|
/\/contrib\//d
|
||
|
/\/linux\//d
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/\2\t\1/
|
||
|
' >/tmp/wut-freebsd
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
{
|
||
|
if ! grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/openbsd/sys/; then
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/openbsd/lib/libc/
|
||
|
fi
|
||
|
} | sed '
|
||
|
/\/linux\//d
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/\2\t\1/
|
||
|
' >/tmp/wut-openbsd
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
{
|
||
|
if ! grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/netbsd/sys/; then
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/netbsd/lib/libc/
|
||
|
fi
|
||
|
} | sed '
|
||
|
/\/linux\//d
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/\2\t\1/
|
||
|
' >/tmp/wut-netbsd
|
||
|
) &
|
||
|
|
||
|
(
|
||
|
grep -R "#define[[:blank:]]\+$1[[:blank:]]" ~/vendor/10.0.18362.0/um/ | sed '
|
||
|
s/\([^:]*\):\(.*\)/\2\t\t\t\1\t\1/
|
||
|
s/\(.*\)\/home\/jart\/vendor\/\([^\/]*\)\/[^[:blank:]]*/\2\t\1/
|
||
|
' >/tmp/wut-windows
|
||
|
) &
|
||
|
|
||
|
wait
|
||
|
|
||
|
f() {
|
||
|
if [ $(ls -lH /tmp/wut-$1 | awk5) -gt 0 ]; then
|
||
|
cat /tmp/wut-$1
|
||
|
else
|
||
|
echo $1 says nothing
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
f linux
|
||
|
f xnu
|
||
|
f freebsd
|
||
|
f openbsd
|
||
|
f netbsd
|
||
|
f windows
|
||
|
f posix
|