Add additinal checks to make sure convert as well as the necessary files are present
[grml-live.git] / etc / grml / fai / config / scripts / RELEASE / 99-update-wallpaper
index 283f54f..675f63a 100755 (executable)
@@ -15,6 +15,22 @@ GRML_WALLPAPER=${GRML_WALLPAPER:-$target/usr/share/grml/desktop.jpg}
 
 echo "Creating release wallpaper"
 
+if [ ! -x "$(which convert)" ]; then
+    echo "convert not installed, skipping release wallpaper."
+    exit 0
+fi
+
+if [ ! -f "$GRML_BG" ]; then
+    echo "Could not find Grml background image, skipping release wallpaper"
+    exit 0
+fi
+
+if [ ! -f "$FONTFILE" ]; then
+    echo "Could not find font $FONTFILE, skipping release wallpaper"
+    exit 0
+fi
+
+
 convert "$GRML_BG" -gravity center \
     -fill white -font "$FONTFILE" \
     -pointsize $TITLE_FONTSIZE \