updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / gconf-ubuntu / gconfpkg
blob72021e45e38d80228b3820f2cd53d2a6625e994a
1 #!/bin/sh
3 usage() {
4 cat << _EOF
5 Usage:
6 gconfpkg [OPTION] [PACKAGE]
8 Help Options:
9 -?, --help Show help options
11 Application Options:
12 --install Install schemas for a given package
13 --uninstall Uninstall schemas for a given package
15 _EOF
18 install() {
19 GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
20 /usr/bin/gconftool-2 --makefile-install-rule /usr/share/gconf/schemas/${pkgname}.schemas >/dev/null
23 uninstall() {
24 if [ -f /usr/share/gconf/schemas/${pkgname}.schemas ]; then
25 schemas=/usr/share/gconf/schemas/${pkgname}.schemas
26 elif [ -f /opt/gnome/share/gconf/schemas/${pkgname}.schemas ]; then
27 schemas=/opt/gnome/share/gconf/schemas/${pkgname}.schemas
28 else
29 schemas=`pacman -Ql ${pkgname} | grep 'gconf/schemas/.*schemas$' | awk '{ print $2 }'`
31 GCONF_CONFIG_SOURCE=`/usr/bin/gconftool-2 --get-default-source` \
32 /usr/bin/gconftool-2 --makefile-uninstall-rule ${schemas} >/dev/null
35 if [ -z "$2" ]; then
36 usage
37 else
38 pkgname="$2"
39 case "$1" in
40 --install)
41 install
43 --uninstall)
44 uninstall
47 usage
49 esac