mirror of
https://github.com/danog/php.git
synced 2025-01-22 04:51:20 +01:00
More minor readability cleanup
This commit is contained in:
parent
ae50f7ac60
commit
70828d6fc4
20
update.sh
20
update.sh
@ -17,19 +17,27 @@ if [ ${#versions[@]} -eq 0 ]; then
|
||||
fi
|
||||
versions=( "${versions[@]%/}" )
|
||||
|
||||
packagesUrl='http://php.net/releases/index.php?serialize=1&max=100'
|
||||
packages="$(echo "$packagesUrl" | sed -r 's/[^a-zA-Z.-]+/-/g')"
|
||||
curl -sSL "${packagesUrl}" > "$packages"
|
||||
|
||||
for version in "${versions[@]}"; do
|
||||
fullVersion=''
|
||||
for comp in xz bz2; do
|
||||
fullVersion="$(sed 's/;/;\n/g' $packages | grep -e 'php-'"$version"'.*\.tar\.'"$comp" | sed -r 's/.*php-('"$version"'[^"]+)\.tar\.'"$comp"'.*/\1/' | sort -V | tail -1)"
|
||||
fullVersion="$(
|
||||
curl -fsSL "https://secure.php.net/releases/index.php?serialize&max=100&version=${version%%.*}" \
|
||||
| sed 's/;/;\n/g' \
|
||||
| grep -e 'php-'"$version"'.*\.tar\.'"$comp" \
|
||||
| sed -r 's/.*php-('"$version"'[^"]+)\.tar\.'"$comp"'.*/\1/' \
|
||||
| sort -V \
|
||||
| tail -1
|
||||
)"
|
||||
if [ "$fullVersion" ]; then
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$fullVersion" ]; then
|
||||
echo >&2 "warning: missing full version for $version; skipping"
|
||||
continue
|
||||
fi
|
||||
|
||||
gpgKey="${gpgKeys[$version]}"
|
||||
if [ -z "$gpgKey" ]; then
|
||||
echo >&2 "ERROR: missing GPG key fingerprint for $version"
|
||||
@ -64,5 +72,3 @@ for version in "${versions[@]}"; do
|
||||
' "$version/Dockerfile" "$version/"*/Dockerfile
|
||||
)
|
||||
done
|
||||
|
||||
rm "$packages"
|
||||
|
Loading…
x
Reference in New Issue
Block a user