[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

CVS:oo-deb/debian/scripts xcftobmp,1.1,1.2



Update of /cvs/debian-openoffice/oo-deb/debian/scripts
In directory gluck:/tmp/cvs-serv2157/debian/scripts

Modified Files:
	xcftobmp 
Log Message:
- use script-fu instead of gimp-perl, thanks martink
- add (commented out) DH_VERBOSE stuff to enable verbose debhelper output
  if necessary


Index: xcftobmp
===================================================================
RCS file: /cvs/debian-openoffice/oo-deb/debian/scripts/xcftobmp,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- xcftobmp	29 Sep 2003 22:47:11 -0000	1.1
+++ xcftobmp	3 Apr 2004 16:27:46 -0000	1.2
@@ -1,17 +1,20 @@
-#!/usr/bin/perl
-
-use Gimp qw(:auto );;
-
-
-$in_name=$ARGV[0];
-$out_name=$ARGV[0];
-$out_name =~ s/xcf$/bmp/;
-
-Gimp::init;
+#!/bin/bash
 
+# gimp_2.0.0-{1-4} has to gimp command, shrugs....
+if [ -x /usr/bin/gimp ]; then
+	GIMP=gimp
+elif [ -x /usr/bin/gimp-2.0 ]; then
+	GIMP=gimp-2.0
+fi
 
-$img = Gimp->xcf_load(0,$in_name, $in_name);
-$layer = $img->flatten;
-file_bmp_save(NON_INTERACTIVE, $layer, $out_name, $out_name);
-gimp_image_delete($img);
-Gimp::end;
+script_fu="
+(let* ((in-name \"$1\")
+       (out-name \"$2\")
+       (img (car (gimp-xcf-load 0 in-name in-name)))
+       (layer (car (gimp-image-flatten img))))
+  (file-bmp-save 0 img layer out-name out-name)
+  (gimp-image-delete img)
+  (gimp-quit 0))
+"
+                                                                                
+$GIMP -i -d -c -b "$script_fu"



Reply to: