From 41698336e8eca90e5f5b539dc4bf4d9a41c7a3db Mon Sep 17 00:00:00 2001 From: Christian Neukirchen Date: Sat, 6 Sep 2014 18:55:10 +0200 Subject: xnuxnu: override file --- xnuxnu | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'xnuxnu') diff --git a/xnuxnu b/xnuxnu index 29c2abd..cbd4054 100755 --- a/xnuxnu +++ b/xnuxnu @@ -3,18 +3,18 @@ pkgname=$1 orig_pkgname=$pkgname -IFS=' +nl=' ' export LC_ALL=C -void_version=$(./xbps-src show "$1" | sed -n '/version/s/[^:]*:[\t]*//p') +void_version=$(./xbps-src show "$1" | sed -n '/^version/s/[^:]*:[\t]*//p') ./xbps-src show "$1" | - sed -n '/distfiles:/{s/[^:]*:[\t]*//;s|/[^/]*$|/|p}; - /Upstream URL/s/[^:]*:[\t]*//p' | - while read url; do - rx="\b$pkgname[-_]?((src|source)[-_])?\K([^-/_\s]*?\d[^-/_\s]*?)(?=(?:[-_.](?:src|source|orig))?\.(?:[jt]ar|shar|t[bglx]z|tbz2|zip))\b" + sed -n '/^distfiles:/{s/[^:]*:[\t]*//;s|/[^/]*$|/|p}; + /^Upstream URL/s/[^:]*:[\t]*//p' | + while IFS=$nl read url; do + rx="(?&2 - curl -A xnuxnu -Ls $url | + curl -A xnuxnu -Ls "$url" | grep -Po -i "$rx" | sort -Vu done | -- cgit 1.4.1