mirror of
https://codeberg.org/kiss-community/repo
synced 2024-08-19 20:56:58 +00:00
26 lines
617 B
Diff
26 lines
617 B
Diff
diff --git a/tools/all_syscalls b/tools/all_syscalls
|
|
index eccb0d0..3d7a34f 100755
|
|
--- a/tools/all_syscalls
|
|
+++ b/tools/all_syscalls
|
|
@@ -1,7 +1,6 @@
|
|
-#!/bin/bash
|
|
+#!/bin/sh
|
|
|
|
set -e
|
|
-set -o pipefail
|
|
|
|
SED="$1"
|
|
shift
|
|
@@ -10,9 +9,9 @@ SYSCALL_INCLUDES="
|
|
#include <sys/syscall.h>
|
|
"
|
|
|
|
-trap 'rm -f $OUTPUT $OUTPUT.deps' ERR
|
|
+trap '[ $? -eq 0 ] || rm -f $OUTPUT $OUTPUT.deps' EXIT
|
|
|
|
-"$@" -MD -MF "$OUTPUT.deps" <<< "$SYSCALL_INCLUDES" -dM -E - \
|
|
+echo "$SYSCALL_INCLUDES" | "$@" -MD -MF "$OUTPUT.deps" -dM -E - \
|
|
| "$SED" -n -e 's/^#define __NR_\([^ ]*\).*$/UL_SYSCALL("\1", __NR_\1)/p' \
|
|
| sort \
|
|
> "$OUTPUT"
|