From c05cbf002460da9a848c98fdd517c41bbc4dc667 Mon Sep 17 00:00:00 2001 From: "Andreas V. 'netrunner' Meier" Date: Sat, 24 Jul 2004 20:35:12 +0000 Subject: [PATCH] Andreas V. Meier: scripts/Download: fix -list-cksums (needed by Create-CkSumPatch) functions: change the regex because descparser does not write the descfilename [2004072221142710732] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3655 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/Download | 7 ++++--- scripts/functions | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/Download b/scripts/Download index bcdc73150..4f30d002f 100755 --- a/scripts/Download +++ b/scripts/Download @@ -633,7 +633,7 @@ download_file_now() { list_dtags() { { descparser package/*/*/*.desc | grep '^\[D\] ' - grep -h '^[X0-9]' target/*/download.txt | sed 's,^,[D] ,' + grep -h '^[X0-9]' target/*/download.txt | sed 's,^,[D] ,' } | column_clean } @@ -641,8 +641,8 @@ list_cksums() { trap '' INT list_dtags | sed \ - -e "s,^$Dre[ ].*\($NODISTre\).*$,\3 download/nodist/\5/\4,;" \ - -e "s,^$Dre$,\3 download/mirror/\5/\4,;" \ + -e "s,^$D2re[ ].*\($NODISTre\).*$,\2 download/nodist/\4/\3,;" \ + -e "s,^$D2re$,\2 download/mirror/\4/\3,;" \ | sed 's,^\(.*/\)[^/:]*:[^ ]* \([X0-9]*\) ,\2 \1,;' | cut -f1,2 -d' ' trap INT @@ -835,6 +835,7 @@ fi case "$1" in -list) list ;; + -list-dtags) list_dtags ;; -list-unknown) list_unknown ;; -list-missing) list_missing ;; -list-cksums) list_cksums ;; diff --git a/scripts/functions b/scripts/functions index 649dd619f..a95c55f62 100644 --- a/scripts/functions +++ b/scripts/functions @@ -729,6 +729,10 @@ Dre='\([^:]*\):\([^ ]*\)[ ]\([^ ]*\)[ ]\(\([^ ]\)[^ ]*\)[ ]\([^ ]*\)' # \1: package-desc-path \2: '[D]' # \3: cksum \4: archive-file # \5: first-letter-of-archive-file \6: download-url +D2re='\([^ ]*\)[ ]\([^ ]*\)[ ]\(\([^ ]\)[^ ]*\)[ ]\([^ ]*\)' +# \1: '[D]' \2: cksum +# \3: archive-file \4: first-letter-of-archive-file +# \5: download-url # NODIST flag regex: NODISTre='[nN][oO][dD][iI][sS][tT]'