[maemo-commits] [maemo-commits] r8525 - in projects/haf/trunk/hildon-theme-tools: . src

From: www-data at stage.maemo.org www-data at stage.maemo.org
Date: Fri Dec 1 13:18:28 EET 2006
Author: mdk
Date: 2006-12-01 13:18:27 +0200 (Fri, 01 Dec 2006)
New Revision: 8525

Added:
   projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle
Modified:
   projects/haf/trunk/hildon-theme-tools/ChangeLog
   projects/haf/trunk/hildon-theme-tools/src/Makefile.am
Log:
Adding the tool to build layout bundles.


Modified: projects/haf/trunk/hildon-theme-tools/ChangeLog
===================================================================
--- projects/haf/trunk/hildon-theme-tools/ChangeLog	2006-12-01 11:14:45 UTC (rev 8524)
+++ projects/haf/trunk/hildon-theme-tools/ChangeLog	2006-12-01 11:18:27 UTC (rev 8525)
@@ -1,3 +1,8 @@
+2006-12-01  Michael Dominic K.  <mdk at mdk.am> 
+
+	* src/Makefile.am:
+	* src/hildon-theme-mk-bundle: Adding the tool to build layout bundles.
+
 2006-11-30  Michael Dominic Kostrzewa  <michael.kostrzewa at nokia.com> 
 
 	* src/Makefile.am: Wrong category.

Modified: projects/haf/trunk/hildon-theme-tools/src/Makefile.am
===================================================================
--- projects/haf/trunk/hildon-theme-tools/src/Makefile.am	2006-12-01 11:14:45 UTC (rev 8524)
+++ projects/haf/trunk/hildon-theme-tools/src/Makefile.am	2006-12-01 11:18:27 UTC (rev 8525)
@@ -4,7 +4,8 @@
 					  hildon-theme-outliner		
 
 dist_bin_SCRIPTS			= hildon-theme-rc-parser	\
-					  hildon-theme-subst
+					  hildon-theme-subst		\
+					  hildon-theme-mk-bundle
 
 # Slicer
 hildon_theme_slicer_CFLAGS 		= $(GTK_CFLAGS)

Added: projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle
===================================================================
--- projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle	2006-12-01 11:14:45 UTC (rev 8524)
+++ projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle	2006-12-01 11:18:27 UTC (rev 8525)
@@ -0,0 +1,63 @@
+#! /usr/bin/perl
+
+# GPL license, Copyright (c) 2006 by Nokia Corporation                       
+#                                                                            
+# Authors:                                                                   
+#      Michael Dominic K. <michael.kostrzewa at nokia.com>
+#                                                                            
+# This program is free software; you can redistribute it and/or modify it    
+# under the terms of the GNU General Public License as published by the      
+# Free Software Foundation, version 2.                                                                   
+#                                                                            
+# This program is distributed in the hope that it will be useful, but        
+# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY 
+# or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   
+# for more details.                                                          
+#                                                                            
+# You should have received a copy of the GNU General Public License along    
+# with this program; if not, write to the Free Software Foundation, Inc., 59 
+# Temple Place - Suite 330, Boston, MA 02111-1307, USA.                      
+
+use File::Basename;
+
+sub show_banner 
+{
+        print "Theme bundle tool by Michael Dominic K.\n";
+        print "Copyright 2006 by Nokia Corporation.\n\n";
+}
+
+sub show_usage 
+{
+        my $program_name = basename($0);
+        print "Usage: $program_name <layout name>\n\n";
+        print "This tool will bundle an installed theme layout into\n";
+        print "a portable zip file.\n\n";
+}
+
+# Check if we have enough arguments
+if ($#ARGV + 1 < 1) {
+        show_banner;
+        show_usage ();
+        print STDERR "ERROR: Not enough arguments specified.\n";
+        exit 128;
+}
+
+$layoutdir = `pkg-config --variable=pkgdatadir $ARGV[0]`;
+if ($? != 0) {
+        print STDERR "ERROR: $ARGV[0] layout was not found in pkgconfig.\n";
+        exit 128;
+}
+
+# Try removing the end of lne char
+$layoutdir =~ s/\n//g;
+
+# Remember current directory
+$currentdir = `pwd`;
+$currentdir =~ s/\n//g;
+
+print "Bundling $ARGV[0] to $ARGV[0].tar.gz\n";
+chdir ($layoutdir);
+`tar czf $currentdir/$ARGV[0].tar.gz *`;
+print "Done!\n\n";
+
+exit 0;


Property changes on: projects/haf/trunk/hildon-theme-tools/src/hildon-theme-mk-bundle
___________________________________________________________________
Name: svn:executable
   + *


More information about the maemo-commits mailing list