代码拉取完成,页面将自动刷新
#!/bin/bash
#
# Set CFLAGS to be strict for supported versions on Travis
#containsElement () {
# local e
# for e in "${@:2}"; do [[ "$e" == "$1" ]] && return 0; done
# return 1
#}
# Bash return statements are not useful. You have to echo the value
# and then capture it by calling the function with $( foo )
function contains() {
local n=$#
local value=${!n}
for ((i=1;i < $#;i++)) {
if [ "${!i}" == "${value}" ]; then
echo "1"
return 0
fi
}
echo "0"
return 0
}
strictPHPVersions=()
strictPHPVersions+=("5.3")
strictPHPVersions+=("5.4")
strictPHPVersions+=("5.5")
strictPHPVersions+=("5.6")
strictPHPVersions+=("7.0")
strictPHPVersions+=("7.1.0alpha1")
echo "TRAVIS_PHP_VERSION is ${TRAVIS_PHP_VERSION}"
strictPHP=$(contains "${strictPHPVersions[@]}" "${TRAVIS_PHP_VERSION}" )
echo "strictPHP is ${strictPHP}"
if [[ $strictPHP = '1' ]]; then
CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Werror -Wall";
else
CFLAGS="-Wno-deprecated-declarations";
fi
echo "Setting CFLAGS to ${CFLAGS}"
export CFLAGS=$CFLAGS
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。