Skip to content

Commit 6f9f6e1

Browse files
committed
Update trunk in Update fetch.sh [skip ci]
1 parent 3452b4e commit 6f9f6e1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/fetch.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ version=$1
22
directory=$2
33
(
44
cd "$directory" || exit 1
5-
trunk=https://windows.php.net/downloads/releases
5+
trunk=https://downloads.php.net/~windows/releases
66
semver=$(curl -sL "$trunk"/releases.json | jq -r ".[\"$version\"].version")
77
if [ "$version" != "${semver%.*}" ]; then
8-
semver=$(curl -sL "$trunk"/archives/ | grep -Po '(?<=HREF=")[^"]*' | grep -Po "$version.[0-9]+" | sort -V | tail -1)
8+
semver=$(curl -sL "$trunk"/archives/ | grep -Po '(?<=href=")[^"]*' | grep -Po "$version.[0-9]+" | sort -V | tail -1)
99
trunk="$trunk"/archives
1010
fi
11-
curl -sL "$trunk" | grep -Po '(?<=HREF=")[^"]*' | grep -E "$semver" | xargs -n 1 -I{} curl -sLO https://windows.php.net/{}
11+
curl -sL "$trunk" | grep -Po '(?<=href=")[^"]*' | grep -E "$semver" | xargs -n 1 -I{} curl -sLO $trunk/{}
1212
)

0 commit comments

Comments
 (0)