comparison setup @ 534:49235ac0891a

A better check?
author edogawaconan <me@myconan.net>
date Wed, 26 Nov 2014 10:45:25 +0900
parents 77c1f9e624a3
children 138ee2cd2179
comparison
equal deleted inserted replaced
533:77c1f9e624a3 534:49235ac0891a
150 } 150 }
151 151
152 _upgrade() { 152 _upgrade() {
153 for i in bash bash.after bash.before bin tcsh tcsh.after tcsh.before zsh zsh.after zsh.before; do 153 for i in bash bash.after bash.before bin tcsh tcsh.after tcsh.before zsh zsh.after zsh.before; do
154 src="${HOME}/.ecos_${i}" 154 src="${HOME}/.ecos_${i}"
155 tgt="${HOME}/.ec.${i}" 155 dst="${HOME}/.ec.${i}"
156 if test -h "${src}" && test ! -h "${tgt}"; then 156 if test -f "${src}" || test -d "${src}" || test -h "${src}"; then
157 _echo "Moving ${src} to ${tgt}" 157 if test ! -f "${dst}" && test ! -d "${dst}" && test ! -h "${dst}"; then
158 mv -f "${src}" "${tgt}" 158 _echo "Moving ${src} to ${dst}"
159 mv -f "${src}" "${dst}"
160 fi
159 fi 161 fi
160 done 162 done
161 } 163 }
162 164
163 _help() { 165 _help() {