[Gnucash-changes] New script to install all of Gnucash's gconf schemas into the users

David Hampton hampton at cvs.gnucash.org
Sat Jul 16 00:00:11 EDT 2005


Log Message:
-----------
New script to install all of Gnucash's gconf schemas into the users
~/.gconf directory.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash/src/bin:
        .cvsignore
        Makefile.am

Added Files:
-----------
    gnucash/src/bin:
        update-gnucash-gconf.in

Revision Data
-------------
Index: .cvsignore
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/.cvsignore,v
retrieving revision 1.4
retrieving revision 1.4.4.1
diff -Lsrc/bin/.cvsignore -Lsrc/bin/.cvsignore -u -r1.4 -r1.4.4.1
--- src/bin/.cvsignore
+++ src/bin/.cvsignore
@@ -12,3 +12,4 @@
 gnucash-make-guids
 gnucash-run-script
 strsub
+update-gnucash-gconf
Index: Makefile.am
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/bin/Makefile.am,v
retrieving revision 1.8.4.2
retrieving revision 1.8.4.3
diff -Lsrc/bin/Makefile.am -Lsrc/bin/Makefile.am -u -r1.8.4.2 -r1.8.4.3
--- src/bin/Makefile.am
+++ src/bin/Makefile.am
@@ -20,7 +20,7 @@
 # by these top-level "common" scripts.
 gnc_common_scripts = gnucash gnucash-env gnucash-run-script gnucash-make-guids
 
-bin_SCRIPTS = ${gnc_common_scripts}
+bin_SCRIPTS = ${gnc_common_scripts} update-gnucash-gconf
 
 # if you change gncoverridedir, make sure you change ./overrides/Makefile.am too.
 gncoverridesdir = ${GNC_LIBEXECDIR}/overrides
@@ -31,4 +31,15 @@
 ${gnc_common_scripts}: generate-gnc-script
 	${srcdir}/generate-gnc-script $@ "${gncoverridesdir}"
 
-CLEANFILES = ${gnc_common_scripts}
+CLEANFILES = ${gnc_common_scripts} update-gnucash-gconf
+
+## We borrow guile's convention and use @-...-@ as the substitution
+## brackets here, instead of the usual @... at .  This prevents autoconf
+## from substituting the values directly into the left-hand sides of
+## the sed substitutions.
+update-gnucash-gconf: update-gnucash-gconf.in ${top_builddir}/config.status
+	rm -f $@.tmp
+	sed < $< > $@.tmp \
+	    -e 's:@-GCONF_SCHEMA_FILE_DIR-@:${GCONF_SCHEMA_FILE_DIR}:g'
+	mv $@.tmp $@
+	chmod +x $@
--- /dev/null
+++ src/bin/update-gnucash-gconf.in
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+SCHEMA_INSTALL_DIR="@-GCONF_SCHEMA_FILE_DIR-@"
+
+cd ${SCHEMA_INSTALL_DIR}
+for file in *.schemas; do
+  gconftool-2 --config-source=xml::${HOME}/.gconf --install-schema-file $file;
+done


More information about the gnucash-changes mailing list