diff setup @ 102:7a287a518718

Merge.
author Edho Prima Arief <edho@myconan.net>
date Thu, 18 Aug 2011 15:20:54 +0700
parents 54a82956bb11
children 7c01fc6f7460
line wrap: on
line diff
--- a/setup	Thu Aug 18 15:15:06 2011 +0700
+++ b/setup	Thu Aug 18 15:20:54 2011 +0700
@@ -3,8 +3,9 @@
 install() {
   uninstall
   #create symlinks
-  linker "tcsh" ".tcsh_init"
+  linker "tcsh" ".ecos_tcsh"
   linker "bash" ".ecos_bash"
+  linker "zsh" ".ecos_zsh"
   linker "tmux" ".tmux.conf"
   linker "hg" ".hgrc"
   linker "vim" ".vimrc"
@@ -14,10 +15,12 @@
   linker "bin" ".ecos_bin"
 
   #modify cshrc
-  echo '[ -r "${HOME}/.tcsh_init" ] && source "${HOME}/.tcsh_init" #ECCORE_TCSH' >> "${HOME}/.cshrc"
+  echo '[ -r "${HOME}/.ecos_tcsh" ] && source "${HOME}/.ecos_tcsh" #ECCORE_TCSH' >> "${HOME}/.cshrc"
   #modify bash_profile and bashrc
   echo '[ -r "${HOME}/.ecos_bash" ] && . "${HOME}/.ecos_bash" #ECCORE_BASH' >> "${HOME}/.bash_profile"
   echo '[ -r "${HOME}/.ecos_bash" ] && . "${HOME}/.ecos_bash" #ECCORE_BASH' >> "${HOME}/.bashrc"
+  #modify zshrc
+  echo '[ -r "${HOME}/.ecos_zsh" ] && . "${HOME}/.ecos_zsh" #ECCORE_ZSH' >> "${HOME}/.zshrc"
 }
 
 linker() {
@@ -33,7 +36,7 @@
 }
 
 uninstall() {
-  for i in .tcsh_init .tmux.conf .hgrc .vimrc .inputrc bin-ec .ecos.bin; do
+  for i in .ecos_tcsh .tmux.conf .hgrc .vimrc .inputrc bin-ec .ecos.bin .ecos_bin .ecos_bash .ecos_zsh; do
     if [ -f "${HOME}/${i}" ]; then
       echo "Removing file: ~/${i}"
       rm -f "${HOME}/${i}"
@@ -44,8 +47,8 @@
 
 update() {
   if [ -f "${HOME}/.tcsh_exec" ]; then
-    mv -f "${HOME}/.tcsh_exec" "${HOME}/.tcsh_init.after"
-    echo "Moved: ${HOME}/.tcsh_exec => ${HOME}/.tcsh_init.after"
+    mv -f "${HOME}/.tcsh_exec" "${HOME}/.ecos_tcsh.after"
+    echo "Moved: ${HOME}/.tcsh_exec => ${HOME}/.ecos_tcsh.after"
   fi
 }