[ease/themes] Automatically package themes with tar when installing.



commit 56c34168ee091c5bfe9074a9649d41ed16e81c26
Author: Nate Stedman <natesm gmail com>
Date:   Fri Jun 4 15:24:31 2010 -0400

    Automatically package themes with tar when installing.

 .gitignore                                   |    4 +++-
 Makefile.am                                  |    4 ++++
 configure.ac                                 |    3 +++
 themes/{White.easetheme => White}/Theme.json |    0
 themes/build.sh                              |   16 ++++++++++++++++
 5 files changed, 26 insertions(+), 1 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index aa53803..a3f614b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,9 +15,11 @@ ease
 src/*.c
 
 *.ogv
-RCOS.ease/
 doc
 
+# ignore theme packages
+*.easetheme
+
 # shamelessly copied from gnome-scan.
 # autotools generated files
 .dirstamp
diff --git a/Makefile.am b/Makefile.am
index 743a530..ea9c8fe 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -86,3 +86,7 @@ desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
 
 Applicationsdir = /usr/share/applications
 Applications_DATA = data/ease.desktop.in
+
+themedir = $(datadir)/ease/themes
+theme_DATA = themes/*.easetheme
+
diff --git a/configure.ac b/configure.ac
index 078661a..38bd8d6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -44,4 +44,7 @@ AC_SUBST(GETTEXT_PACKAGE)
 AM_GLIB_GNU_GETTEXT
 AM_GNU_GETTEXT([external])
 
+dnl Package Themes
+AC_CONFIG_COMMANDS([build-themes], [sh themes/build.sh])
+
 AC_OUTPUT
diff --git a/themes/White.easetheme/Theme.json b/themes/White/Theme.json
similarity index 100%
rename from themes/White.easetheme/Theme.json
rename to themes/White/Theme.json
diff --git a/themes/build.sh b/themes/build.sh
new file mode 100755
index 0000000..91546aa
--- /dev/null
+++ b/themes/build.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+echo "  Archiving themes..."
+
+cd themes
+
+for THEME in `find ./* -maxdepth 0 -type d | sed "s/.\///g"`
+	do
+		echo "    Archiving $THEME to $THEME.easetheme ..."
+		cd $THEME
+		tar -cf ../$THEME.easetheme `ls`
+		cd ..
+	done
+
+echo "  Done archiving themes."
+



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