php/5/scripts/alpine-setup.sh

29 lines
697 B
Bash

#!/bin/sh
PHP_LIST="bcmath,bz2,calendar,cgi,ctype,
curl,dba,dev,doc,
dom,embed,enchant,exif,ftp,
gd,gettext,gmp,iconv,imap,
intl,json,ldap,mailparse,mcrypt,
memcache,opcache,openssl,pcntl,pdo,
pear,pear-net_socket,phar,phpdbg,
phpmailer,posix,pspell,shmop,
snmp,soap,sockets,sysvmsg,sysvsem,
sysvshm,wddx,xcache,xml,xmlreader,
xmlrpc,xsl,zip,zlib"
PHP_DEPS=""
echo $FLAVOR
if [[ "$FLAVOR" == "debug" ]]; then
/sbin/apk add --update --no-cache php$PHP_VER_SHORT-dbg;
fi
if [ "$FLAVOR" == "full" ] || [ "$FLAVOR" == "debug" ]; then
for i in $(echo $PHP_LIST | tr "," "\n"); do
PHP_DEPS="${PHP_DEPS} php$PHP_VER_SHORT-$i ";
done
/sbin/apk add --update --no-cache $PHP_DEPS;