diff options
Diffstat (limited to 'misc/ibus/doinst.sh')
-rw-r--r-- | misc/ibus/doinst.sh | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/misc/ibus/doinst.sh b/misc/ibus/doinst.sh index b292e6286c41..81bf0074f40f 100644 --- a/misc/ibus/doinst.sh +++ b/misc/ibus/doinst.sh @@ -11,6 +11,20 @@ config() { # Otherwise, we leave the .new copy for the admin to consider... } +preserve_perms() { + NEW="$1" + OLD="$(dirname $NEW)/$(basename $NEW .new)" + if [ -e $OLD ]; then + cp -a $OLD ${NEW}.incoming + cat $NEW > ${NEW}.incoming + mv ${NEW}.incoming $NEW + fi + config $NEW +} + +preserve_perms etc/profile.d/ibus.sh.new +preserve_perms etc/profile.d/ibus.csh.new + GCONF_CONFIG_SOURCE="xml::etc/gconf/gconf.xml.defaults" \ chroot . gconftool-2 --makefile-install-rule \ /etc/gconf/schemas/ibus.schemas 1>/dev/null @@ -25,16 +39,6 @@ if [ -e usr/share/icons/hicolor/icon-theme.cache ]; then fi fi -# Prepare the new configuration files -for file in etc/profile.d/ibus.sh.new etc/profile.d/ibus.csh.new ; do - if [ -e $(dirname $file)/$(basename $file .new) -a -x $(dirname $file)/$(basename $file .new) ]; then - chmod 0755 $file - else - chmod 0644 $file - fi - config $file -done - # Run gtk-query-immodules so that "ibus" will appear under Input Method # when you right- click your mouse in a text box. if [ -x usr/bin/update-gtk-immodules ]; then |