]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
os400: Add function wrapper for system command
authorKevin Adler <kadler@us.ibm.com>
Mon, 24 Jan 2022 22:45:48 +0000 (16:45 -0600)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 17 Feb 2022 21:25:50 +0000 (22:25 +0100)
The wrapper will exit if the system command failed instead of blindly
continuing on.

In addition, only copy docs which exist, since now the copy failure will
cause the build to stop.

Closes #8455

packages/OS400/initscript.sh
packages/OS400/makefile.sh

index 6897a5de3701ba332ef03426c892a4b89db1cebe..93e713cf95fe70a1f962e7b245bc7f831e5cab8e 100644 (file)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
 #
 ###########################################################################
 
+system ()
+{
+    /usr/bin/system "$@" || exit 1
+}
 
 setenv()
 
index bfc56da3d656f30861cff1f498a0cee564fa6ffc..ab968b22eb9edf569b98c49bfcd09621057a7e99 100644 (file)
@@ -6,7 +6,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2022, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -59,6 +59,8 @@ do      MEMBER="`basename \"${TEXT}\" .OS400`"
         MEMBER="`basename \"${MEMBER}\" .md`"
         MEMBER="${LIBIFSNAME}/DOCS.FILE/`db2_name \"${MEMBER}\"`.MBR"
 
+        [ -e "${TEXT}" ] || continue
+
         if action_needed "${MEMBER}" "${TEXT}"
         then    CMD="CPY OBJ('${TEXT}') TOOBJ('${MEMBER}') TOCCSID(${TGTCCSID})"
                 CMD="${CMD} DTAFMT(*TEXT) REPLACE(*YES)"