changeset 46:65f98c2936c1

[setup] Why use -e when it should be -f
author Edho Prima Arief <me@myconan.net>
date Wed, 27 Apr 2011 21:22:03 +0700
parents 7e462da3caa0
children 684a22aeb675
files setup
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/setup	Wed Apr 27 21:21:47 2011 +0700
+++ b/setup	Wed Apr 27 21:22:03 2011 +0700
@@ -25,7 +25,7 @@
 }
 
 uninstall_tcsh() {
-  if [ -e "${HOME}/.cshrc" ]; then
+  if [ -f "${HOME}/.cshrc" ]; then
     grep -v '#ECCORE_TCSH' "${HOME}/.cshrc" > .cleancshrc
     mv .cleancshrc "${HOME}/.cshrc"
   fi
@@ -33,7 +33,7 @@
 
 uninstall() {
   for i in .tcsh_init .tmux.conf .hgrc .vimrc .inputrc bin-ec .ecos.bin; do
-    if [ -e "${HOME}/${i}" ]; then
+    if [ -f "${HOME}/${i}" ]; then
       echo "Removing file: ~/${i}"
       rm -f "${HOME}/${i}"
     fi