comparison setup @ 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 1f1af28f36e9
children 684a22aeb675
comparison
equal deleted inserted replaced
45:7e462da3caa0 46:65f98c2936c1
23 echo "Creating symlink: ${1} => ~/${2}" 23 echo "Creating symlink: ${1} => ~/${2}"
24 ln -fs "${PWD}/${1}" "${HOME}/${2}" 24 ln -fs "${PWD}/${1}" "${HOME}/${2}"
25 } 25 }
26 26
27 uninstall_tcsh() { 27 uninstall_tcsh() {
28 if [ -e "${HOME}/.cshrc" ]; then 28 if [ -f "${HOME}/.cshrc" ]; then
29 grep -v '#ECCORE_TCSH' "${HOME}/.cshrc" > .cleancshrc 29 grep -v '#ECCORE_TCSH' "${HOME}/.cshrc" > .cleancshrc
30 mv .cleancshrc "${HOME}/.cshrc" 30 mv .cleancshrc "${HOME}/.cshrc"
31 fi 31 fi
32 } 32 }
33 33
34 uninstall() { 34 uninstall() {
35 for i in .tcsh_init .tmux.conf .hgrc .vimrc .inputrc bin-ec .ecos.bin; do 35 for i in .tcsh_init .tmux.conf .hgrc .vimrc .inputrc bin-ec .ecos.bin; do
36 if [ -e "${HOME}/${i}" ]; then 36 if [ -f "${HOME}/${i}" ]; then
37 echo "Removing file: ~/${i}" 37 echo "Removing file: ~/${i}"
38 rm -f "${HOME}/${i}" 38 rm -f "${HOME}/${i}"
39 fi 39 fi
40 done 40 done
41 uninstall_tcsh 41 uninstall_tcsh