diff options
author | Thomas Tuegel <ttuegel@mailbox.org> | 2020-12-24 07:58:53 -0600 |
---|---|---|
committer | Thomas Tuegel <ttuegel@mailbox.org> | 2020-12-26 05:24:25 -0600 |
commit | 3db04334e3eb57839b397c6d0de94d55dd18a812 (patch) | |
tree | da3f2587000a377cddf173544624f02453834728 /maintainers/scripts | |
parent | d45783a43f6a58df5421561e9e93df2d443aeb21 (diff) |
Revert "fetch-kde-qt.sh: get hashes from metadata"
This reverts commit 4b7d9dc86800fa7b861f47ae0e6e3a8f097f9ce7. The KDE project has changed their source index pages so that the links to package metadata files are generated by JavaScript after the page loads. As a result, wget is no longer able to recursively fetch the package metadata automatically.
Diffstat (limited to 'maintainers/scripts')
-rwxr-xr-x | maintainers/scripts/fetch-kde-qt.sh | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/maintainers/scripts/fetch-kde-qt.sh b/maintainers/scripts/fetch-kde-qt.sh index c6c980dd0cb67..22d78151978b0 100755 --- a/maintainers/scripts/fetch-kde-qt.sh +++ b/maintainers/scripts/fetch-kde-qt.sh @@ -14,13 +14,12 @@ fi tmp=$(mktemp -d) pushd $tmp >/dev/null -wget -nH -r -c --no-parent "${WGET_ARGS[@]}" -A '*.tar.xz.sha256' -A '*.mirrorlist' >/dev/null -find -type f -name '*.mirrorlist' -delete +wget -nH -r -c --no-parent "${WGET_ARGS[@]}" >/dev/null csv=$(mktemp) find . -type f | while read src; do # Sanitize file name - filename=$(gawk '{ print $2 }' "$src" | tr '@' '_') + filename=$(basename "$src" | tr '@' '_') nameVersion="${filename%.tar.*}" name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,' | sed -e 's,-everywhere-src$,,') version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,') @@ -40,8 +39,8 @@ gawk -F , "{ print \$1 }" $csv | sort | uniq | while read name; do latestVersion=$(echo "$versions" | sort -rV | head -n 1) src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" $csv) filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" $csv) - url="$(dirname "${src:2}")/$filename" - sha256=$(gawk '{ print $1 }' "$src") + url="${src:2}" + sha256=$(nix-hash --type sha256 --base32 --flat "$src") cat >>"$SRCS" <<EOF $name = { version = "$latestVersion"; |