rm set_fcitx and continue to use scim defaultly

modified:   install_shell/create_users.sh
	deleted:    install_shell/set_fcitx.sh
	new file:   install_shell/set_tcsh_encode.sh
	modified:   setup.sh
This commit is contained in:
Peng Zhihui
2014-03-18 15:43:55 +08:00
parent fd80cd8766
commit 391c6cccaf
4 changed files with 12 additions and 38 deletions

View File

@@ -40,7 +40,6 @@ check_konsole $HOME
cp -r root-kde/.kde $HOME/
cp -r d5000-kde/.kde $USER_HOME/
#cp -r /etc/skel/.kde $USER_HOME/
cp -r d5000-fcitx/.config $USER_HOME/
chown -R ${USER_NAME}:${USER_NAME} ${USER_HOME}
usermod -p `openssl passwd root` root

View File

@@ -1,35 +0,0 @@
#!/bin/bash
set -x -e
IM_CONFIG=/usr/share/config/kdm/Xsession
#grep "LC_CTYPE" /etc/csh.cshrc
#if [ $? -ne 0 ];then
if grep -q -v "LC_CTYPE" /etc/csh.cshrc;then
echo "setenv LC_CTYPE zh_CN.gb18030">>/etc/csh.cshrc
fi
if [ "$1" = "scim" ];then
imethod=fcitx
elif [ "$1" = "fcitx" ];then
imethod=scim
else
echo "Usage:[fcitx | scim]"
exit 1
fi
line1=$(grep -n $1 $IM_CONFIG | tail -n 1 | cut -d: -f1)
line2=$(grep -n ${imethod} $IM_CONFIG | tail -n 1 | cut -d: -f1)
#grep $1 $IM_CONFIG | tail -n 1 | grep '#' &> /dev/null
#if [ $? -eq 0 ];then
if grep "$1" "$IM_CONFIG" | tail -n 1 | grep '#';then
sed -i "${line1}s@#@@" $IM_CONFIG
sed -i "${line2}s@^@#&@" $IM_CONFIG
echo "$1 change successful."
else
echo "$1 already."
exit 0
fi

View File

@@ -0,0 +1,10 @@
#!/bin/bash
if test "$1" != 'tcsh';then
exit
fi
if grep -q -v "LC_CTYPE" /etc/csh.cshrc;then
echo "setenv LC_CTYPE zh_CN.gb18030">>/etc/csh.cshrc
fi

View File

@@ -50,8 +50,8 @@ echo "===Set /etc/fstab==="
./set_close_ipv6.sh
echo "===close ipv6 ip==="
./set_fcitx.sh fcitx
echo "====Set fonts & Input method..."
./set_tcsh_encode.sh $3
echo "====Set tcsh encode to gb18030..."
./other.sh $1 $2 $3
echo "===Set other==="