summaryrefslogtreecommitdiffstats
path: root/util/bin/make-realwallpaper
diff options
context:
space:
mode:
authorlassulus <lassulus@googlemail.com>2013-10-30 18:33:08 +0100
committerlassulus <lassulus@googlemail.com>2013-10-30 18:33:08 +0100
commit42748584f82c93e674e1c7dc94d90de1f0a364ae (patch)
tree50b963698b9ad415b32311727d7b9126d635d805 /util/bin/make-realwallpaper
parent45ff766f6041493968ddd7a37265fb6baae71dab (diff)
make-realwallpaper delete files when not image
Diffstat (limited to 'util/bin/make-realwallpaper')
-rwxr-xr-xutil/bin/make-realwallpaper17
1 files 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