summaryrefslogtreecommitdiff
path: root/scripts/package/gen-diff-patch
diff options
context:
space:
mode:
authorMasahiro Yamada <masahiroy@kernel.org>2024-07-03 03:02:42 +0900
committerMasahiro Yamada <masahiroy@kernel.org>2024-07-16 16:06:18 +0900
commitc0414419758b2521c2038847960af258c678db8d (patch)
treec3d018a34fb165db57d1a754f889c4c0e1b4b7a9 /scripts/package/gen-diff-patch
parentc52090805382387f60c8e4cf8d613d0cf77ee1e9 (diff)
kbuild: package: add -e and -u options to some shell scripts
Set -e to make these scripts fail on the first error. Set -u because these scripts are invoked by Makefile, and do not work properly without necessary variables defined. I tweaked mkdebian to cope with optional environment variables. Remove the explicit "test -n ..." from install-extmod-build. Both options are described in POSIX. [1] [1]: https://pubs.opengroup.org/onlinepubs/009604499/utilities/set.html Signed-off-by: Masahiro Yamada <masahiroy@kernel.org> Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Diffstat (limited to 'scripts/package/gen-diff-patch')
-rwxr-xr-xscripts/package/gen-diff-patch2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripts/package/gen-diff-patch b/scripts/package/gen-diff-patch
index 8a98b7bb78a0..f272f7770ea3 100755
--- a/scripts/package/gen-diff-patch
+++ b/scripts/package/gen-diff-patch
@@ -1,6 +1,8 @@
#!/bin/sh
# SPDX-License-Identifier: GPL-2.0-only
+set -eu
+
diff_patch=$1
mkdir -p "$(dirname "${diff_patch}")"