From 42748584f82c93e674e1c7dc94d90de1f0a364ae Mon Sep 17 00:00:00 2001 From: lassulus Date: Wed, 30 Oct 2013 18:33:08 +0100 Subject: make-realwallpaper delete files when not image --- util/bin/make-realwallpaper | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/util/bin/make-realwallpaper b/util/bin/make-realwallpaper index 22e93b96..07903ac3 100755 --- a/util/bin/make-realwallpaper +++ b/util/bin/make-realwallpaper @@ -5,9 +5,20 @@ set -euf #run in new directory(will be polluted with images #just run ./make-realwallpaper -curl -z Nightmap_bare.jpg http://awka.sourceforge.net/Night_le_huge.jpg -o Nightmap_bare.jpg -curl -z Daymap_bare.png http://www.nnvl.noaa.gov/images/globaldata/SnowIceCover_Daily.png -o Daymap_bare.png -curl -z Clouds.jpg http://user.chol.com/~winxplanet/cloud_data/clouds_2048.jpg -o Clouds.jpg +curl -z Nightmap_bare.jpg http://awka.sourceforge.net/Night_le_huge.jpg -o Nightmap_bare.jpg & +curl -z Daymap_bare.png http://www.nnvl.noaa.gov/images/globaldata/SnowIceCover_Daily.png -o Daymap_bare.png & +curl -z Clouds.jpg http://user.chol.com/~winxplanet/cloud_data/clouds_2048.jpg -o Clouds.jpg & +wait + +if file -ib Nightmap_bare.jpg|grep -q ^image/; then + rm Nightmap_bare.jpg +fi +if file -ib Daymap_bare.png|grep -q ^image/; then + rm Daymap_bare.png +fi +if file -ib Clouds.jpg|grep -q ^image/; then + rm Clouds.jpg +fi #resize the Daymap convert Daymap_bare.png -scale 4000x2000 Daymap.png -- cgit v1.2.3