fetch-kde-qt.sh: get hashes from metadata
This commit is contained in:
parent
7e8d125e19
commit
4b7d9dc868
|
@ -14,12 +14,13 @@ fi
|
||||||
|
|
||||||
tmp=$(mktemp -d)
|
tmp=$(mktemp -d)
|
||||||
pushd $tmp >/dev/null
|
pushd $tmp >/dev/null
|
||||||
wget -nH -r -c --no-parent "${WGET_ARGS[@]}" >/dev/null
|
wget -nH -r -c --no-parent "${WGET_ARGS[@]}" -A '*.tar.xz.sha256' -A '*.mirrorlist' >/dev/null
|
||||||
|
find -type f -name '*.mirrorlist' -delete
|
||||||
|
|
||||||
csv=$(mktemp)
|
csv=$(mktemp)
|
||||||
find . -type f | while read src; do
|
find . -type f | while read src; do
|
||||||
# Sanitize file name
|
# Sanitize file name
|
||||||
filename=$(basename "$src" | tr '@' '_')
|
filename=$(gawk '{ print $2 }' "$src" | tr '@' '_')
|
||||||
nameVersion="${filename%.tar.*}"
|
nameVersion="${filename%.tar.*}"
|
||||||
name=$(echo "$nameVersion" | sed -e 's,-[[:digit:]].*,,' | sed -e 's,-opensource-src$,,' | sed -e 's,-everywhere-src$,,')
|
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:]]*-\)\+,,')
|
version=$(echo "$nameVersion" | sed -e 's,^\([[:alpha:]][[:alnum:]]*-\)\+,,')
|
||||||
|
@ -38,8 +39,8 @@ gawk -F , "{ print \$1 }" $csv | sort | uniq | while read name; do
|
||||||
latestVersion=$(echo "$versions" | sort -rV | head -n 1)
|
latestVersion=$(echo "$versions" | sort -rV | head -n 1)
|
||||||
src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" $csv)
|
src=$(gawk -F , "/^$name,$latestVersion,/ { print \$3 }" $csv)
|
||||||
filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" $csv)
|
filename=$(gawk -F , "/^$name,$latestVersion,/ { print \$4 }" $csv)
|
||||||
url="${src:2}"
|
url="$(dirname "${src:2}")/$filename"
|
||||||
sha256=$(nix-hash --type sha256 --base32 --flat "$src")
|
sha256=$(gawk '{ print $1 }' "$src")
|
||||||
cat >>"$SRCS" <<EOF
|
cat >>"$SRCS" <<EOF
|
||||||
$name = {
|
$name = {
|
||||||
version = "$latestVersion";
|
version = "$latestVersion";
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
WGET_ARGS=( https://download.kde.org/stable/applications/18.12.1/ -A '*.tar.xz' )
|
WGET_ARGS=( https://download.kde.org/stable/applications/18.12.1/ )
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
WGET_ARGS=( https://download.kde.org/stable/plasma/5.14.5/ -A '*.tar.xz' )
|
WGET_ARGS=( https://download.kde.org/stable/plasma/5.14.5/ )
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
WGET_ARGS=( https://download.kde.org/stable/frameworks/5.54/ -A '*.tar.xz' )
|
WGET_ARGS=( https://download.kde.org/stable/frameworks/5.54/ )
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.11/5.11.3/submodules/ \
|
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.11/5.11.3/submodules/ )
|
||||||
-A '*.tar.xz' )
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.0/submodules/ \
|
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.12/5.12.0/submodules/ )
|
||||||
-A '*.tar.xz' )
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.6/5.6.3/submodules/ \
|
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.6/5.6.3/submodules/ \
|
||||||
http://download.qt.io/community_releases/5.6/5.6.3/ \
|
http://download.qt.io/community_releases/5.6/5.6.3/ )
|
||||||
-A '*.tar.xz' )
|
|
||||||
|
|
|
@ -1,2 +1 @@
|
||||||
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.9/5.9.7/submodules/ \
|
WGET_ARGS=( http://download.qt.io/official_releases/qt/5.9/5.9.7/submodules/ )
|
||||||
-A '*.tar.xz' )
|
|
||||||
|
|
Loading…
Reference in New Issue