mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-01 01:17:02 +00:00
Add set pipefail in most framework scripts.
set pipefail changes the pipeline return status from being the return status of the last command to the last non 0 exit status of any command in the pipeline. This is needed to make sure all the commands in a pipeline did actually return a non 0 status and not only the last one.
This commit is contained in:
parent
cd36c020a0
commit
e9b2078c6c
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=554139
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -12,6 +12,7 @@
|
||||
# c. Files in plist which are owned by dependencies/MTREEs
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. ${SCRIPTSDIR}/functions.sh
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -23,6 +23,8 @@
|
||||
# The PLIST_SUB feature can be disabled by setting PLIST_SUB_SED=
|
||||
# in environment.
|
||||
|
||||
set pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_CHECK_LEFTOVERS}" ] && set -x
|
||||
|
||||
origin="$1"
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
# $FreeBSD$
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. ${dp_SCRIPTSDIR}/functions.sh
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
# $FreeBSD$
|
||||
# Maintainer: portmgr@FreeBSD.org
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_DIALOG4PORTS}" ] && set -x
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. ${dp_SCRIPTSDIR}/functions.sh
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -2,6 +2,8 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
|
||||
set pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_FIND_LIB}" ] && set -x
|
||||
|
||||
if [ -z "${LIB_DIRS}" -o -z "${LOCALBASE}" ]; then
|
||||
|
@ -9,6 +9,8 @@
|
||||
# /usr/local/bin/ssh -> /usr/local/lib/debug/usr/local/bin/ssh.debug
|
||||
LIB_DIR_PREFIX="${LOCALBASE}/lib/debug"
|
||||
|
||||
set pipefail
|
||||
|
||||
msg() {
|
||||
echo "====> $*"
|
||||
}
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -4,6 +4,7 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
|
||||
set -e
|
||||
set pipefail
|
||||
|
||||
. "${dp_SCRIPTSDIR}/functions.sh"
|
||||
|
||||
|
@ -5,6 +5,8 @@
|
||||
#
|
||||
# PLIST_SUB_SED helper to sort by longest value first.
|
||||
|
||||
set pipefail
|
||||
|
||||
awk '{
|
||||
while (match($0, /s![^!]*![^!]*!g;/)) {
|
||||
sedp=substr($0, RSTART, RLENGTH)
|
||||
|
@ -3,6 +3,8 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
|
||||
set pipefail
|
||||
|
||||
if [ -z "${SCRIPTSDIR}" ]; then
|
||||
echo "Must set SCRIPTSDIR" >&2
|
||||
exit 1
|
||||
|
@ -2,6 +2,8 @@
|
||||
# MAINTAINER: portmgr@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
|
||||
set pipefail
|
||||
|
||||
if [ -z "${STAGEDIR}" -o -z "${PREFIX}" -o -z "${LOCALBASE}" ]; then
|
||||
echo "STAGEDIR, PREFIX, LOCALBASE required in environment." >&2
|
||||
exit 1
|
||||
|
@ -2,6 +2,7 @@
|
||||
# MAINTAINER: rust@FreeBSD.org
|
||||
# $FreeBSD$
|
||||
set -eu
|
||||
set pipefail
|
||||
|
||||
if [ "${OPSYS}" != FreeBSD ] || [ "${OSVERSION}" -lt 1200000 ]; then
|
||||
exit 0
|
||||
|
@ -25,6 +25,8 @@
|
||||
# if those targets modify source files (e.g. with sed). You may also
|
||||
# want to disable EXTRA_PATCHES as well if that is being used.
|
||||
|
||||
set pipefail
|
||||
|
||||
[ -n "${DEBUG_MK_SCRIPTS}" -o -n "${DEBUG_MK_SCRIPTS_SMART_MAKEPATCH}" ] && set -x
|
||||
|
||||
if [ -z "${PATCHDIR}" -o -z "${PATCH_WRKSRC}" -o -z "${WRKDIR}" ]; then
|
||||
|
Loading…
Reference in New Issue
Block a user