diff --git a/5.6/alpine3.4/cli/docker-php-ext-enable b/5.6/alpine3.4/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/alpine3.4/cli/docker-php-ext-enable +++ b/5.6/alpine3.4/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/5.6/alpine3.4/fpm/docker-php-ext-enable b/5.6/alpine3.4/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/alpine3.4/fpm/docker-php-ext-enable +++ b/5.6/alpine3.4/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/5.6/alpine3.4/zts/docker-php-ext-enable b/5.6/alpine3.4/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/alpine3.4/zts/docker-php-ext-enable +++ b/5.6/alpine3.4/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/5.6/jessie/apache/docker-php-ext-enable b/5.6/jessie/apache/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/jessie/apache/docker-php-ext-enable +++ b/5.6/jessie/apache/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/5.6/jessie/cli/docker-php-ext-enable b/5.6/jessie/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/jessie/cli/docker-php-ext-enable +++ b/5.6/jessie/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/5.6/jessie/fpm/docker-php-ext-enable b/5.6/jessie/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/jessie/fpm/docker-php-ext-enable +++ b/5.6/jessie/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/5.6/jessie/zts/docker-php-ext-enable b/5.6/jessie/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/5.6/jessie/zts/docker-php-ext-enable +++ b/5.6/jessie/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/alpine3.4/cli/docker-php-ext-enable b/7.0/alpine3.4/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/alpine3.4/cli/docker-php-ext-enable +++ b/7.0/alpine3.4/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/alpine3.4/fpm/docker-php-ext-enable b/7.0/alpine3.4/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/alpine3.4/fpm/docker-php-ext-enable +++ b/7.0/alpine3.4/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/alpine3.4/zts/docker-php-ext-enable b/7.0/alpine3.4/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/alpine3.4/zts/docker-php-ext-enable +++ b/7.0/alpine3.4/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/jessie/apache/docker-php-ext-enable b/7.0/jessie/apache/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/jessie/apache/docker-php-ext-enable +++ b/7.0/jessie/apache/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/jessie/cli/docker-php-ext-enable b/7.0/jessie/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/jessie/cli/docker-php-ext-enable +++ b/7.0/jessie/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/jessie/fpm/docker-php-ext-enable b/7.0/jessie/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/jessie/fpm/docker-php-ext-enable +++ b/7.0/jessie/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.0/jessie/zts/docker-php-ext-enable b/7.0/jessie/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.0/jessie/zts/docker-php-ext-enable +++ b/7.0/jessie/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/alpine3.4/cli/docker-php-ext-enable b/7.1/alpine3.4/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/alpine3.4/cli/docker-php-ext-enable +++ b/7.1/alpine3.4/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/alpine3.4/fpm/docker-php-ext-enable b/7.1/alpine3.4/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/alpine3.4/fpm/docker-php-ext-enable +++ b/7.1/alpine3.4/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/alpine3.4/zts/docker-php-ext-enable b/7.1/alpine3.4/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/alpine3.4/zts/docker-php-ext-enable +++ b/7.1/alpine3.4/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/jessie/apache/docker-php-ext-enable b/7.1/jessie/apache/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/jessie/apache/docker-php-ext-enable +++ b/7.1/jessie/apache/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/jessie/cli/docker-php-ext-enable b/7.1/jessie/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/jessie/cli/docker-php-ext-enable +++ b/7.1/jessie/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/jessie/fpm/docker-php-ext-enable b/7.1/jessie/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/jessie/fpm/docker-php-ext-enable +++ b/7.1/jessie/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.1/jessie/zts/docker-php-ext-enable b/7.1/jessie/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.1/jessie/zts/docker-php-ext-enable +++ b/7.1/jessie/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/alpine3.6/cli/docker-php-ext-enable b/7.2/alpine3.6/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/alpine3.6/cli/docker-php-ext-enable +++ b/7.2/alpine3.6/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/alpine3.6/fpm/docker-php-ext-enable b/7.2/alpine3.6/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/alpine3.6/fpm/docker-php-ext-enable +++ b/7.2/alpine3.6/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/alpine3.6/zts/docker-php-ext-enable b/7.2/alpine3.6/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/alpine3.6/zts/docker-php-ext-enable +++ b/7.2/alpine3.6/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/alpine3.7/cli/docker-php-ext-enable b/7.2/alpine3.7/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/alpine3.7/cli/docker-php-ext-enable +++ b/7.2/alpine3.7/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/alpine3.7/fpm/docker-php-ext-enable b/7.2/alpine3.7/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/alpine3.7/fpm/docker-php-ext-enable +++ b/7.2/alpine3.7/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/alpine3.7/zts/docker-php-ext-enable b/7.2/alpine3.7/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/alpine3.7/zts/docker-php-ext-enable +++ b/7.2/alpine3.7/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/stretch/apache/docker-php-ext-enable b/7.2/stretch/apache/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/stretch/apache/docker-php-ext-enable +++ b/7.2/stretch/apache/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/stretch/cli/docker-php-ext-enable b/7.2/stretch/cli/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/stretch/cli/docker-php-ext-enable +++ b/7.2/stretch/cli/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/stretch/fpm/docker-php-ext-enable b/7.2/stretch/fpm/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/stretch/fpm/docker-php-ext-enable +++ b/7.2/stretch/fpm/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/7.2/stretch/zts/docker-php-ext-enable b/7.2/stretch/zts/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/7.2/stretch/zts/docker-php-ext-enable +++ b/7.2/stretch/zts/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi diff --git a/docker-php-ext-enable b/docker-php-ext-enable index ab5fe98c..a2aa88ec 100755 --- a/docker-php-ext-enable +++ b/docker-php-ext-enable @@ -1,7 +1,8 @@ #!/bin/sh set -e -cd "$(php -r 'echo ini_get("extension_dir");')" +extDir="$(php -r 'echo ini_get("extension_dir");')" +cd "$extDir" usage() { echo "usage: $0 [options] module-name [module-name ...]" @@ -10,7 +11,12 @@ usage() { echo " $0 --ini-name 0-apc.ini apcu apc" echo echo 'Possible values for module-name:' - echo $(find -maxdepth 1 -type f -name '*.so' -exec basename '{}' ';' | sort) + find -maxdepth 1 \ + -type f \ + -name '*.so' \ + -exec basename '{}' ';' \ + | sort \ + | xargs echo echo 'Some of the above modules are already compiled into PHP; please check' echo 'the output of "php -i" to see which modules are already loaded.' @@ -47,7 +53,7 @@ for module; do module="$module.so" fi if ! [ -f "$module" ]; then - echo >&2 "error: $(readlink -f "$module") does not exist" + echo >&2 "error: '$module' does not exist" echo >&2 usage >&2 exit 1 @@ -80,7 +86,8 @@ fi for module in $modules; do if readelf --wide --syms "$module" | grep -q ' zend_extension_entry$'; then # https://wiki.php.net/internals/extensions#loading_zend_extensions - line="zend_extension=$(readlink -f "$module")" + absModule="$(readlink -f "$module")" + line="zend_extension=$absModule" else line="extension=$module" fi