Initial commit

This commit is contained in:
2019-05-26 15:57:49 +02:00
commit 9f74ec1089
34290 changed files with 5059123 additions and 0 deletions

View File

@@ -0,0 +1,36 @@
#!/bin/bash
set -e
usage() {
echo "usage: $0 [channel/]<package> ..."
echo " ie: $0 uploadprogress oauth-1.2.3"
}
if [ $# -eq 0 ]; then
usage >&2
exit 1
fi
pecl install "$@"
while [ $# -gt 0 ]; do
ext="$1"
ext=$(echo "$ext" | cut -d- -f1)
ext=$(echo "$ext" | cut -d\/ -f2)
shift
for module in $(find /usr/local/lib/php/extensions -name "$ext.so"); do
ini="/usr/local/etc/php/conf.d/docker-php-pecl-$ext.ini"
if grep -q zend_extension_entry "$module"; then
# https://wiki.php.net/internals/extensions#loading_zend_extensions
line="zend_extension=$(readlink -f "$module")"
else
line="extension=$(basename "$module")"
fi
if ! grep -q "$line" "$ini" 2>/dev/null; then
echo "$line" >> "$ini"
fi
done
done
rm -rf /tmp/*