mirror of
https://github.com/mlocati/docker-php-extension-installer
synced 2025-05-09 00:22:40 +00:00
Initial commit
This commit is contained in:
parent
fe4fcfb9e2
commit
d9d8e5fc34
6 changed files with 914 additions and 0 deletions
28
scripts/common
Executable file
28
scripts/common
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Reset the Internal Field Separator
|
||||
resetIFS () {
|
||||
IFS='
|
||||
'
|
||||
}
|
||||
|
||||
# Check if a string is in a list of space-separated string
|
||||
#
|
||||
# Arguments:
|
||||
# $1: the string to be checked
|
||||
# $2: the string list
|
||||
#
|
||||
# Return:
|
||||
# 0 (true): if the string is in the list
|
||||
# 1 (false): if the string is not in the list
|
||||
stringInList () {
|
||||
resetIFS
|
||||
for stringInList_listItem in ${2}
|
||||
do
|
||||
if test "${1}" = "${stringInList_listItem}"
|
||||
then
|
||||
return 0
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue