[script]2nd script for bonjourmadame

This commit is contained in:
Mathieu Maret 2010-07-06 11:02:45 +02:00
parent ac8abd1629
commit 21dfed57c2
2 changed files with 17 additions and 0 deletions

17
scripts/bonjourmadame.sh Executable file
View File

@ -0,0 +1,17 @@
#!/bin/bash
# Verification de la connection internet
while [ $(chkinternet) != "1" ]; do sleep 15; done
echo Internet connection [OK]
# Declaration des variables et chemins
prefix=$HOME/bonjourmadame/bonjourmadame.jpg
fileprefix=$HOME/bonjourmadame/bonjourmadame_
todaywp=$fileprefix$(date +%d_%m_%y).jpg
# mis à jour du fond d'écran
gconftool -s -t string /desktop/gnome/background/picture_filename $HOME/bonjourmadame/load.jpg
sleep 2
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 $prefix
sleep 2
gconftool -s -t string /desktop/gnome/background/picture_filename $HOME/bonjourmadame/bonjourmadame.jpg

BIN
scripts/load.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB