From 63eb14d055d467625a5ec79691e4750eb16cff95 Mon Sep 17 00:00:00 2001 From: Mathieu Date: Mon, 2 Aug 2004 09:51:26 +0000 Subject: [PATCH] Mathieu Doidy: fixed misc/archives/fmnewpackage.sh [2004072612054316566] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@3756 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- misc/archive/fmnewpackage.sh | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/misc/archive/fmnewpackage.sh b/misc/archive/fmnewpackage.sh index 0a526d335..69664e84c 100644 --- a/misc/archive/fmnewpackage.sh +++ b/misc/archive/fmnewpackage.sh @@ -47,7 +47,7 @@ get_download() { download_url="" for arg; do if curl -s -I -f "$arg" -o "header.log"; then - location="`grep Location: header.log | sed 's,Location:[ ]\([.0-9A-Za-z-:/% ]*\).*,\1,'`" + location="`grep Location: header.log | sed -e 's,Location:[ ]\([.0-9A-Za-z:/% -]*\).*,\1,' -e 's,prdownloads.sourceforge.net,dl.sourceforge.net,'`" download_file="`basename $location`" download_url="`dirname $location`/" rm -f header.log @@ -92,21 +92,21 @@ read_fm_config() { # download package fm-page and grep for the author html="http://freshmeat.net/projects/$fmname/" curl -I -s "$html" -o "header.log" - html_new="`grep Location: header.log | sed 's,Location:[ ]\([.0-9A-Za-z-:/%?_= ]*\).*,\1,'`" - [ ! -z html_new ] && html="$html_new" + html_new="`grep Location: header.log | sed 's,Location:[ ]\([.0-9A-Za-z:/%?_= -]*\).*,\1,'`" + [ ! -z "$html_new" ] && html="$html_new" unset html_new rm -f header.log curl -s "$html" -o "$fmname.html" dev_name="`grep 'contact developer' "$fmname.html" | sed 's,^[[:blank:]]*\(.*\)[[:blank:]].*$,\1,'`>" - echo "__at__ @" >subst - echo "__dot__ ." >>subst - echo "|at| @" >>subst - echo "|dot| ." >>subst - echo "\\[at\\] @" >>subst - echo "\\[dot\\] ." >>subst - echo "(at) @" >>subst - echo "(dot) ." >>subst + echo '__at__ @' >subst + echo '__dot__ .' >>subst + echo '|at| @' >>subst + echo '|dot| .' >>subst + echo '[at] @' >>subst + echo '[dot] .' >>subst + echo '(at) @' >>subst + echo '(dot) .' >>subst echo -n "$dev_mail" >dev_mail # for some strange reason, this doesn't work: @@ -116,7 +116,7 @@ read_fm_config() { # dev_mail will have the same value as before cat subst | while read from to ; do dev_mail="`cat dev_mail`" - dev_mail="${dev_mail// $from /$to}" + dev_mail="${dev_mail// ${from} /${to}}" echo -n "$dev_mail" >dev_mail done dev_mail="`cat dev_mail`"