Sophie

Sophie

distrib > * > cooker > x86_64 > by-pkgid > e0b05907d589b6bd24bf78f1f1ca339c > scriptlet

ibus-table-yong-1.3.1-1.noarch.rpm

PREUN

/bin/sh

key="/desktop/ibus/general/preload_engines" 
if [ "$1" = "0" ]; then 
        current_value=$(/usr/bin/gconftool-2 --get ${key} 2>/dev/null); 
        current_value=${current_value/[/}; 
        current_value=${current_value/]/}; 
        new_value=$(echo $current_value | tr ',' '\n' | grep -v ^yong$ |tr '\n' ',' | sed 's/,$//'); 
        if [ -z ${new_value} ]; then 
                /usr/bin/gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --unset $key; 
        else 
                new_value="[${new_value}]"; 
                /usr/bin/gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --set $key --type list --list-type=string "${new_value}"; 
        fi 
fi

POSTIN

/bin/sh

key="/desktop/ibus/general/preload_engines" 
if [ "$1" = "1" -a `locale -a|grep zh_CN |wc -l` -gt 0 ]; then 
        current_value=$(/usr/bin/gconftool-2 --get ${key} 2>/dev/null); 
        current_value=${current_value/[/}; 
        current_value=${current_value/]/}; 
        if [ -n "${current_value}" ]; then 
                new_value="${current_value},"; 
        fi 
        new_value="${new_value}yong"; 
        new_value="[${new_value}]"; 
        /usr/bin/gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --set $key --type list --list-type=string "${new_value}"; 
fi