From 70ee115571821c47b2d71c4555ce8456a81cf819 Mon Sep 17 00:00:00 2001 From: Felix Buehler Date: Sun, 30 Jan 2022 23:12:32 +0100 Subject: [PATCH] from-quicklisp: move urls-from-page.sh to its directory --- .../from-quicklisp/barebones-quicklisp-expression.sh | 6 +++--- .../lisp-modules/from-quicklisp}/urls-from-page.sh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename pkgs/{build-support/upstream-updater => development/lisp-modules/from-quicklisp}/urls-from-page.sh (99%) diff --git a/pkgs/development/lisp-modules/from-quicklisp/barebones-quicklisp-expression.sh b/pkgs/development/lisp-modules/from-quicklisp/barebones-quicklisp-expression.sh index f8bae8997272..7959d1146f7c 100755 --- a/pkgs/development/lisp-modules/from-quicklisp/barebones-quicklisp-expression.sh +++ b/pkgs/development/lisp-modules/from-quicklisp/barebones-quicklisp-expression.sh @@ -51,7 +51,7 @@ url="${ql_src##* }" [ "$ql_src_type" = github ] && { ql_src_type=git url="https://github.com/$url"; - version="$("$(dirname "$0")/../../../build-support/upstream-updater/urls-from-page.sh" "$url/releases/" | grep /tag/ | head -n 1 | xargs -l1 basename)" + version="$("$(dirname "$0")/urls-from-page.sh" "$url/releases/" | grep /tag/ | head -n 1 | xargs -l1 basename)" rev="refs/tags/$version"; } @@ -62,7 +62,7 @@ url="${ql_src##* }" ) && { url="${url/git:/https:}" url="${url%.git}" - [ -z "$rev" ] && rev=$("$(dirname "$0")/../../../build-support/upstream-updater/urls-from-page.sh" "$url/commits" | grep /commit/ | head -n 1 | xargs basename) + [ -z "$rev" ] && rev=$("$(dirname "$0")/urls-from-page.sh" "$url/commits" | grep /commit/ | head -n 1 | xargs basename) hash=$("$(dirname "$0")/../../../build-support/fetchgit/nix-prefetch-git" "$url" "$rev" | grep . | tail -n 1) [ -z "$version" ] && version="git-$(date +%Y%m%d)"; } @@ -131,7 +131,7 @@ url="${ql_src##* }" [ "$ql_src_type" = froydware-http ] && { dirurl="http://method-combination.net/lisp/files/"; - url="$("$(dirname "$0")/../../../build-support/upstream-updater/urls-from-page.sh" "$dirurl" | + url="$("$(dirname "$0")/urls-from-page.sh" "$dirurl" | grep "/${url}_" | grep -v "[.]asc\$" | tail -n 1)" ql_src_type=http } diff --git a/pkgs/build-support/upstream-updater/urls-from-page.sh b/pkgs/development/lisp-modules/from-quicklisp/urls-from-page.sh similarity index 99% rename from pkgs/build-support/upstream-updater/urls-from-page.sh rename to pkgs/development/lisp-modules/from-quicklisp/urls-from-page.sh index db39286ccb02..26724d122a77 100755 --- a/pkgs/build-support/upstream-updater/urls-from-page.sh +++ b/pkgs/development/lisp-modules/from-quicklisp/urls-from-page.sh @@ -6,7 +6,7 @@ path="${url#$protocol://}" server="${path%%/*}" basepath="${path%/*}" relpath="${path#$server}" - + echo "URL: $url" >&2 curl -A 'text/html; text/xhtml; text/xml; */*' -L -k "$url" | sed -re 's/^/-/;s/[^a-zA-Z][hH][rR][eE][fF]=("([^"]*)"|'\''([^'\'']*)'\''|([^"'\'' <>&]+)[ <>&])/\n+\2\3\4\n-/g' | \