From 047d8378b941d516474d16f5e6700b8036fb982a Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Tue, 1 Mar 2011 01:16:16 +0100 Subject: [PATCH] [Script] getMadame accepte an history argument as a number --- scripts/getMadame.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/getMadame.sh b/scripts/getMadame.sh index ce147ef..2e79c97 100755 --- a/scripts/getMadame.sh +++ b/scripts/getMadame.sh @@ -11,6 +11,12 @@ # Note : Works on Gnome and Xfce # ########################################### +page= + +if [ $# != 0 ] +then + page="/page/${1}" +fi function chkinternet { if [ `wget -q -O - google.com | grep -c "Google"` != 0 ] @@ -84,7 +90,7 @@ then mkdir $dirprefix; fi -wget -O - http://www.bonjourmadame.fr | grep -Eo "(http://www.bonjourmadame.fr/photo/[^\"]+)|(http://[0-9]+.media.tumblr.com/tumblr[^\"]+)" | head -n 1 | wget -q -i - -O $todaywp +wget -O - "http://www.bonjourmadame.fr${page}" | grep -Eo "(http://www.bonjourmadame.fr/photo/[^\"]+)|(http://[0-9]+.media.tumblr.com/tumblr[^\"]+)" | head -n 1 | wget -q -i - -O $todaywp echo Photo downloaded OK #ls $fileprefix* | sort -r | tail -n +2 | xargs rm -f