Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
# Let's set a sane environment
|
|
|
|
set -o errexit
|
|
|
|
set -o nounset
|
|
|
|
|
|
|
|
WANTED_VERSION="${1:-}"
|
2021-01-26 16:58:14 +01:00
|
|
|
WANTED_VERSION_AFTERCARET="${1#^}"
|
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
INSTALLME=xdebug
|
|
|
|
if test -n "$WANTED_VERSION"; then
|
2021-08-11 11:43:38 +02:00
|
|
|
INSTALLME="$INSTALLME-$1"
|
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
fi
|
|
|
|
|
2021-01-14 17:05:23 +01:00
|
|
|
CI=true ./install-php-extensions "$INSTALLME"
|
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
|
|
|
|
INSTALLED_VERSION="$(php --ri xdebug | grep -Ei 'Version\s*=>\s*' | sed -E 's/^.*?=>\s*//')"
|
|
|
|
if test -z "$WANTED_VERSION"; then
|
2021-08-11 11:43:38 +02:00
|
|
|
printf 'Installing the default version worked (we installed version %s)\n' "$INSTALLED_VERSION"
|
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
elif test "$WANTED_VERSION" = "$INSTALLED_VERSION"; then
|
2021-08-11 11:43:38 +02:00
|
|
|
printf 'Installing specific version %s worked\n' "$WANTED_VERSION"
|
2021-01-26 16:58:14 +01:00
|
|
|
elif test "$WANTED_VERSION" != "$WANTED_VERSION_AFTERCARET" && test "${INSTALLED_VERSION#$WANTED_VERSION_AFTERCARET.}" != "$INSTALLED_VERSION"; then
|
2021-08-11 11:43:38 +02:00
|
|
|
printf 'Installing version compatible with %s worked (we installed version %s)\n' "$WANTED_VERSION" "$INSTALLED_VERSION"
|
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
else
|
2021-08-11 11:43:38 +02:00
|
|
|
printf 'We wanted to install version %s, but we installed %s\n' "$WANTED_VERSION" "$INSTALLED_VERSION" >&2
|
|
|
|
exit 1
|
Let users install a specific PHP module version
Test: amqp,apcu,gmagick,http,pecl_http,igbinary,memcache,mailparse,memcached,mongodb,mosquitto,msgpack,oauth,opencensus,parallel,pcov,pdo_sqlsrv,sqlsrv,propro,protobuf,pthreads,raphf,rdkafka,redis,solr,ssh2,uuid,xdebug,uopz,xhprof,yaml
2020-12-02 18:19:24 +01:00
|
|
|
fi
|