[Script] getMadame accepte an history argument as a number

This commit is contained in:
Mathieu Maret 2011-03-01 01:16:16 +01:00
parent d7384c7d03
commit 047d8378b9

View File

@ -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 "<title>Google</title>"` != 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