From eb3d40c72c9dd19f6a5ef79b41e9d8ba73ccd928 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 1 Sep 2011 23:14:36 +0000 Subject: Thu Sep 1 23:14:36 UTC 2011 --- gnome-unstable/gconf/gconfpkg | 50 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100755 gnome-unstable/gconf/gconfpkg (limited to 'gnome-unstable/gconf/gconfpkg') diff --git a/gnome-unstable/gconf/gconfpkg b/gnome-unstable/gconf/gconfpkg new file mode 100755 index 000000000..72021e45e --- /dev/null +++ b/gnome-unstable/gconf/gconfpkg @@ -0,0 +1,50 @@ +#!/bin/sh + +usage() { +cat << _EOF +Usage: + gconfpkg [OPTION] [PACKAGE] + + Help Options: + -?, --help Show help options + + Application Options: + --install Install schemas for a given package + --uninstall Uninstall schemas for a given package + +_EOF +} + +install() { + GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \ + /usr/bin/gconftool-2 --makefile-install-rule /usr/share/gconf/schemas/${pkgname}.schemas >/dev/null +} + +uninstall() { + if [ -f /usr/share/gconf/schemas/${pkgname}.schemas ]; then + schemas=/usr/share/gconf/schemas/${pkgname}.schemas + elif [ -f /opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then + schemas=/opt/gnome/share/gconf/schemas/${pkgname}.schemas + else + schemas=`pacman -Ql ${pkgname} | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'` + fi + GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \ + /usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas} >/dev/null +} + +if [ -z "$2" ]; then + usage +else + pkgname="$2" + case "$1" in + --install) + install + ;; + --uninstall) + uninstall + ;; + *) + usage + ;; + esac +fi -- cgit v1.2.3-54-g00ecf