diff --git a/install_shell/create_users.sh b/install_shell/create_users.sh index 3d8afe3..5d59cc3 100755 --- a/install_shell/create_users.sh +++ b/install_shell/create_users.sh @@ -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 diff --git a/install_shell/set_fcitx.sh b/install_shell/set_fcitx.sh deleted file mode 100755 index 6c28fe0..0000000 --- a/install_shell/set_fcitx.sh +++ /dev/null @@ -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 diff --git a/install_shell/set_tcsh_encode.sh b/install_shell/set_tcsh_encode.sh new file mode 100755 index 0000000..6d7c247 --- /dev/null +++ b/install_shell/set_tcsh_encode.sh @@ -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 + diff --git a/setup.sh b/setup.sh index bf7718f..3f44389 100755 --- a/setup.sh +++ b/setup.sh @@ -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==="