====== ZAKS Web API Documentation ======
#!/bin/bash
if [[ -z ${1} ]]; then
echo "Give an extension name..."
exit 1
fi
declare -a errors
versions=($(ls -1 /etc/php))
while [[ $# -gt 0 ]]; do
for version in ${versions[@]}; do
echo -n "Installing php${version}-${1}..."
apt -y install php${version}-${1} > /dev/null 2>&1
if [[ $? == 0 ]]; then
echo "INSTALLED!"
else
echo "FAILED!"
errors+=("php${version}-${1}")
fi
done
shift
done
echo
echo
echo
if [[ ${#errors[@]} -gt 0 ]]; then
echo "The following extensions failed to install:"
echo ${errors[@]} | tr ' ' '\n'
exit 1
else
echo "Everything installed without a hitch!"
fi
{
"status": 200,
"result": "ok",
"data": {
"this_key": "This value!",
"that_key": true,
"the_other_key": 3.14
},
"array": [
"one",
"two",
"three"
]
}