Add gbs.conf
[profile/ivi/psplash.git] / make-image-header.sh
index 1a4691d..d7cf67c 100755 (executable)
@@ -1,6 +1,10 @@
 #!/bin/sh
-imageh=psplash-image.h
+
+set -e
+
+imageh=`basename $1 .png`-img.h
+name="${2}_IMG"
 gdk-pixbuf-csource --macros $1 > $imageh.tmp
-sed -e 's/MY_PIXBUF/IMG/g' -e "s/guint8/uint8/g" $imageh.tmp > $imageh && rm $imageh.tmp
+sed -e "s/MY_PIXBUF/${name}/g" -e "s/guint8/uint8/g" $imageh.tmp > $imageh && rm $imageh.tmp