1
0
Fork 0
mirror of https://github.com/mlocati/docker-php-extension-installer synced 2025-05-09 00:22:40 +00:00

Let TravisCI automatically rebuild README.md when pushing

This commit is contained in:
Michele Locati 2018-04-12 09:17:21 +02:00
parent e0965d93e3
commit 830d462bd8
No known key found for this signature in database
GPG key ID: 98B7CE2E7234E28B
3 changed files with 120 additions and 0 deletions

View file

@ -26,3 +26,29 @@ stringInList () {
done
return 1
}
# Return the strings that are present in two space-separated strings
#
# Arguments:
# $1: the first space-separated string
# $2: the first second-separated string
#
# Output:
# The space-separated list of strings that are present in both lists
commonElements () {
commonElements_result=''
resetIFS
for commonElements_inA in ${1}
do
if stringInList "${commonElements_inA}" "${2}"
then
if test -z "${commonElements_result}"
then
commonElements_result="${commonElements_inA}"
else
commonElements_result="${commonElements_result} ${commonElements_inA}"
fi
fi
done
echo "${commonElements_result}"
}