From: mitty Date: Thu, 4 Oct 2012 09:52:12 +0000 (+0000) Subject: * #55 X-Git-Url: http://lab.mitty.jp/git/?a=commitdiff_plain;h=1be8507042782e5a73c959886e075222eeaabb71;p=lab.git * #55 * fix: when dir1/target and dir2/target both exist but file type differ, only output dir1 and dir2 (drop ./target information) git-svn-id: https://lab.mitty.jp/svn/lab/trunk@172 7d2118f6-f56c-43e7-95a2-4bb3031d96e7 --- diff --git a/TipAndDoc/.bin/cmpdir b/TipAndDoc/.bin/cmpdir index edae02f..45d474c 100755 --- a/TipAndDoc/.bin/cmpdir +++ b/TipAndDoc/.bin/cmpdir @@ -14,9 +14,9 @@ if [ $# -eq 3 ]; then [ ! -e "$1/$3" ] && [ -e "$2/$3" ] && echo "Only in '$2': '$3'" >&2 && exit [ -f "$1/$3" ] && [ -d "$2/$3" ] && - echo "'$1' is a regular file but '$2' is a directory" >&2 && exit + echo "'$1/$3' is a regular file but '$2/$3' is a directory" >&2 && exit [ -d "$1/$3" ] && [ -f "$2/$3" ] && - echo "'$1' is a directory but '$2' is a regular file" >&2 && exit + echo "'$1/$3' is a directory but '$2/$3' is a regular file" >&2 && exit cmp -s "$1/$3" "$2/$3" || echo "$1/$3" "$2/$3" are differ >&2 exit