diff --git a/buildconf b/buildconf index 0586cbf0cd27..4c1f8b6a01f1 100755 --- a/buildconf +++ b/buildconf @@ -2,15 +2,17 @@ # # A wrapper around Autoconf that generates files to build PHP on *nix systems. +set -ex + PHP_AUTOCONF=${PHP_AUTOCONF:-autoconf} PHP_AUTOHEADER=${PHP_AUTOHEADER:-autoheader} force=0 debug=0 # Go to project root. -cd "$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" || exit +cd "$(CDPATH='' cd -- "$(dirname -- "$0")" && pwd -P)" -php_extra_version=$(grep '^AC_INIT(' configure.ac) || exit +php_extra_version=$(grep '^AC_INIT(' configure.ac) case "$php_extra_version" in *-dev*) dev=1 diff --git a/scripts/dev/gen_verify_stub b/scripts/dev/gen_verify_stub index f9d9cc67ee3e..19c3e576693e 100755 --- a/scripts/dev/gen_verify_stub +++ b/scripts/dev/gen_verify_stub @@ -1,5 +1,7 @@ #!/bin/bash +set -ex + # Handle GNU vs. BSD checksum utilities sha256sum="$(which sha256sum)" sha256sum="${sha256sum:-$(which shasum) -a 256}" diff --git a/scripts/dev/genfiles b/scripts/dev/genfiles index a7068e8c3f81..75c2515c16ff 100755 --- a/scripts/dev/genfiles +++ b/scripts/dev/genfiles @@ -31,6 +31,8 @@ # For example: # YACC=/path/to/bison ./genfiles +set -ex + YACC=${YACC:-bison} YACC="$YACC -l" YFLAGS="-Wall" @@ -40,7 +42,7 @@ SED=${SED:-sed} MAKE=${MAKE:-make} # Go to project root. -cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" || exit +cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" # Check required bison version from the configure.ac file. required_bison_version=$($SED -n 's/PHP_PROG_BISON(\[\([0-9\.]*\)\].*/\1/p' configure.ac) diff --git a/scripts/dev/makedist b/scripts/dev/makedist index 6c8ef3c1dc8a..105be77aad73 100755 --- a/scripts/dev/makedist +++ b/scripts/dev/makedist @@ -5,17 +5,16 @@ # Written by Stig Bakken 1997-05-28. # Adapted to Git by Stanislav Malyshev . +set -ex + # Check whether gtar is present (GNU tar) -tar="$(which gtar)" -tar="${tar:-$(which tar)}" +tar="$(command -v gtar || command -v tar)" # Handle GNU vs. BSD checksum utilities -md5sum="$(which md5sum)" -md5sum="${md5sum:-$(which md5)}" +md5sum="$(command -v md5sum || command -v md5)" # GNU touch is preferred since it handles local TZ in timestamps -touch="$(which gtouch)" -touch="${touch:-$(which touch)}" +touch="$(command -v gtouch || command -v touch)" if [[ $($tar --version) == *"bsdtar"* ]]; then echo "Found bsdtar at $tar, but this script needs GNU tar." @@ -23,7 +22,7 @@ if [[ $($tar --version) == *"bsdtar"* ]]; then fi # Go to project root directory. -cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" || exit +cd "$(CDPATH='' cd -- "$(dirname -- "$0")/../../" && pwd -P)" # Process options and arguments. while :; do