changeset 5:de6ce93d40fc

Added action message. Fixed missed files.
author Edho Prima Arief <me@myconan.net>
date Sat, 17 Jul 2010 02:32:30 +0700
parents 94ee419ad047
children 2ae8e6222b9d
files setup
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/setup	Sat Jul 10 12:38:52 2010 +0000
+++ b/setup	Sat Jul 17 02:32:30 2010 +0700
@@ -1,6 +1,7 @@
 #!/bin/sh
 
 install() {
+  uninstall
   #create symlinks
   linker "tcsh" ".tcsh_init"
   linker "tmux" ".tmux.conf"
@@ -9,11 +10,11 @@
   linker "bin" "bin-ec"
 
   #modify cshrc
-  uninstall_tcsh
   echo '[ -r "${HOME}/.tcsh_init" ] && source "${HOME}/.tcsh_init" #ECCORE_TCSH' >> "${HOME}/.cshrc"
 }
 
 linker() {
+  echo "Creating symlink: ${1} => ~/${2}"
   ln -fs "${PWD}/${1}" "${HOME}/${2}"
 }
 
@@ -25,8 +26,11 @@
 }
 
 uninstall() {
-  for i in .tcsh_init .tmux_conf .hgrc .vimrc; do
-    [ -e "${HOME}/${i}" ] && rm -f "${HOME}/${i}"
+  for i in .tcsh_init .tmux.conf .hgrc .vimrc bin-ec; do
+    if [ -e "${HOME}/${i}" ]; then
+      echo "Removing file: ~/${i}"
+      rm -f "${HOME}/${i}"
+    fi
   done
   uninstall_tcsh
 }