summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevin Adler <kadler@us.ibm.com>2022-01-24 16:45:48 -0600
committerDaniel Stenberg <daniel@haxx.se>2022-02-17 22:25:50 +0100
commit86ad624c5aa6d8568946c9ea47c5de88101ee226 (patch)
tree07926652e502bfd2aef623b7ad57c0b3049f09e7
parenta70600ca599b95a188aa2fa3977299a3c7249520 (diff)
downloadcurl-86ad624c5aa6d8568946c9ea47c5de88101ee226.tar.gz
os400: Add function wrapper for system command
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
-rw-r--r--packages/OS400/initscript.sh6
-rw-r--r--packages/OS400/makefile.sh4
2 files changed, 8 insertions, 2 deletions
diff --git a/packages/OS400/initscript.sh b/packages/OS400/initscript.sh
index 6897a5de3..93e713cf9 100644
--- a/packages/OS400/initscript.sh
+++ b/packages/OS400/initscript.sh
@@ -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
@@ -21,6 +21,10 @@
#
###########################################################################
+system ()
+{
+ /usr/bin/system "$@" || exit 1
+}
setenv()
diff --git a/packages/OS400/makefile.sh b/packages/OS400/makefile.sh
index bfc56da3d..ab968b22e 100644
--- a/packages/OS400/makefile.sh
+++ b/packages/OS400/makefile.sh
@@ -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)"