]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
Revert "tools/all_syscalls: use pipefail"
authorKarel Zak <kzak@redhat.com>
Tue, 15 Aug 2023 10:49:20 +0000 (12:49 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 15 Aug 2023 10:52:27 +0000 (12:52 +0200)
Our CI don't like it.

See also old http://github.com/util-linux/util-linux/commit/fffe5f7c72121c054645c60c0bb49f653bb7142e

This reverts commit d53a1529bd79077a8e7232651f99f20890283c0c.

tools/all_syscalls

index e4327b2d99522dd4f9fbba7c3d137f6c3eafc81d..aa068a3f20db4d5077a3ef76a48e17edac6762d2 100755 (executable)
@@ -1,17 +1,17 @@
 #!/bin/sh
 
+set -e
+
 OUTPUT=syscalls.h
 SYSCALL_INCLUDES="
 #include <sys/syscall.h>
 "
 
-# pipefail is part of modern POSIX
-# shellcheck disable=SC3040
-set -o pipefail
+trap 'rm $OUTPUT $OUTPUT.deps' ERR
 
 echo "$SYSCALL_INCLUDES" \
        | "$@" -MD -MF "$OUTPUT.deps" -dM -E - \
        | grep '^#define __NR_' \
        | sed 's/#define __NR_\([^[:space:]]*\).*/UL_SYSCALL("\1", __NR_\1)/' \
        | sort \
-       > "$OUTPUT" || { rm $OUTPUT $OUTPUT.deps; return 1; }
+       > "$OUTPUT"