-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path21-php-ini-download
More file actions
31 lines (21 loc) · 886 Bytes
/
21-php-ini-download
File metadata and controls
31 lines (21 loc) · 886 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/command/with-contenv bash
set -euo pipefail
export BF_E=`basename ${0}`
#======================================================================================================================
# Get php.ini.
#======================================================================================================================
DOWNLOADED="${PHP_DIR}/php.ini-${PHP_INI}.downloaded"
if [ -e ${DOWNLOADED} ] ; then
exit 0
fi
if [ "${PHP_INI}" = "development" ] || [ "${PHP_INI}" = "production" ] ; then
URL="https://raw.githubusercontent.com/php/php-src/master/php.ini-${PHP_INI}"
bf-echo "Downloading php.ini from ${URL}..."
bf-wget -O ${PHP_DIR}/php.ini ${URL} \
&& touch ${DOWNLOADED}
exit 0
elif [ "${PHP_INI}" = "custom" ] ; then
bf-echo "Custom PHP configuration enabled."
exit 0
fi
bf-error "Unsupported PHP_INI value '${PHP_INI}'."