diff options
author | root <root@rshg054.dnsready.net> | 2012-03-10 00:01:15 +0000 |
---|---|---|
committer | root <root@rshg054.dnsready.net> | 2012-03-10 00:01:15 +0000 |
commit | 3792e3874accbc868e7032042f1ecefdef25638e (patch) | |
tree | 2ba250e0011924d6172b918515475864187e84db /gnome-unstable/gconf/gconfpkg | |
parent | 0a7c64736c0b026c3105928d89500a8af1ad5eac (diff) |
Sat Mar 10 00:01:15 UTC 2012
Diffstat (limited to 'gnome-unstable/gconf/gconfpkg')
-rwxr-xr-x | gnome-unstable/gconf/gconfpkg | 50 |
1 files changed, 50 insertions, 0 deletions
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 |