mirror of
https://github.com/danog/php.git
synced 2024-11-26 20:04:58 +01:00
Fix version-id bug, drop unused code, check that URL exists before allowing "versions.sh" to continue
This commit is contained in:
parent
c257144e4b
commit
02a9bf3ec9
@ -1,7 +1,7 @@
|
||||
def version_id:
|
||||
# https://www.php.net/phpversion
|
||||
# $version_id = $major_version * 10000 + $minor_version * 100 + $release_version;
|
||||
sub("[a-z].*$"; "")
|
||||
sub("[a-zA-Z].*$"; "")
|
||||
| split(".")
|
||||
| (
|
||||
(.[0] // 0 | tonumber) * 10000
|
||||
|
@ -23,8 +23,6 @@ declare -A gpgKeys=(
|
||||
# https://www.php.net/downloads.php#gpg-7.2
|
||||
# https://www.php.net/gpg-keys.php#gpg-7.2
|
||||
[7.2]='1729F83938DA44E27BA0F4D3DBDB397470D12172 B1B44D8F021E4E2D6021E995DC9FF8D3EE5AF27F'
|
||||
|
||||
[7.1]='foo'
|
||||
)
|
||||
# see https://www.php.net/downloads.php
|
||||
|
||||
@ -104,6 +102,11 @@ for version in "${versions[@]}"; do
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if ! wget -q --spider "$url"; then
|
||||
echo >&2 "error: '$url' appears to be missing"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# if we don't have a .asc URL, let's see if we can figure one out :)
|
||||
if [ -z "$ascUrl" ] && wget -q --spider "$url.asc"; then
|
||||
ascUrl="$url.asc"
|
||||
|
Loading…
Reference in New Issue
Block a user