# HG changeset patch # User edogawaconan # Date 1416966325 -32400 # Node ID 49235ac0891a650a3cde62f8783d5195ebb0ddb0 # Parent 77c1f9e624a373540f4d6696ebb72b8d723bd367 A better check? diff -r 77c1f9e624a3 -r 49235ac0891a setup --- a/setup Tue Nov 25 15:03:54 2014 +0900 +++ b/setup Wed Nov 26 10:45:25 2014 +0900 @@ -152,10 +152,12 @@ _upgrade() { for i in bash bash.after bash.before bin tcsh tcsh.after tcsh.before zsh zsh.after zsh.before; do src="${HOME}/.ecos_${i}" - tgt="${HOME}/.ec.${i}" - if test -h "${src}" && test ! -h "${tgt}"; then - _echo "Moving ${src} to ${tgt}" - mv -f "${src}" "${tgt}" + dst="${HOME}/.ec.${i}" + if test -f "${src}" || test -d "${src}" || test -h "${src}"; then + if test ! -f "${dst}" && test ! -d "${dst}" && test ! -h "${dst}"; then + _echo "Moving ${src} to ${dst}" + mv -f "${src}" "${dst}" + fi fi done }