History

scripts: objdiff: direct error messages to stderr

Masahiro Yamada committed 12 years ago

Commit 5ab370e1 parent fd6e1241 file · +9 −9Browse files

Showing the changes to scripts/objdiff (1 of 1 file). Show all

Unified · Split

scripts/objdiff+9−9
@@ -28,17 +28,17 @@ · 27 unmodified lines
28SRCTREE=$(git rev-parse --show-toplevel 2>/dev/null)28SRCTREE=$(git rev-parse --show-toplevel 2>/dev/null)
29 29
30if [ -z "$SRCTREE" ]; then30if [ -z "$SRCTREE" ]; then
31 echo "ERROR: Not a git repository."31 echo >&2 "ERROR: Not a git repository."
32 exit 132 exit 1
33fi33fi
34 34
35TMPD=$SRCTREE/.tmp_objdiff35TMPD=$SRCTREE/.tmp_objdiff
36 36
37usage() {37usage() {
38 echo "Usage: $0 <command> <args>"38 echo >&2 "Usage: $0 <command> <args>"
39 echo " record <list of object files>"39 echo >&2 " record <list of object files>"
40 echo " diff <commitA> <commitB>"40 echo >&2 " diff <commitA> <commitB>"
41 echo " clean all | <commit>"41 echo >&2 " clean all | <commit>"
42 exit 142 exit 1
43}43}
44 44
@@ -88,12 +88,12 @@ dodiff() { · 43 unmodified lines
88 DSTD="$TMPD/$DST"88 DSTD="$TMPD/$DST"
89 89
90 if [ ! -d "$SRCD" ]; then90 if [ ! -d "$SRCD" ]; then
91 echo "ERROR: $SRCD doesn't exist"91 echo >&2 "ERROR: $SRCD doesn't exist"
92 exit 192 exit 1
93 fi93 fi
94 94
95 if [ ! -d "$DSTD" ]; then95 if [ ! -d "$DSTD" ]; then
96 echo "ERROR: $DSTD doesn't exist"96 echo >&2 "ERROR: $DSTD doesn't exist"
97 exit 197 exit 1
98 fi98 fi
99 99
@@ -112,7 +112,7 @@ doclean() { · 12 unmodified lines
112 if [ -d "$TMPD/$CMT" ]; then112 if [ -d "$TMPD/$CMT" ]; then
113 rm -rf $TMPD/$CMT113 rm -rf $TMPD/$CMT
114 else114 else
115 echo "$CMT not found"115 echo >&2 "$CMT not found"
116 fi116 fi
117 fi117 fi
118}118}
@@ -133,7 +133,7 @@ case "$1" in · 14 unmodified lines
133 doclean $*133 doclean $*
134 ;;134 ;;
135 *)135 *)
136 echo "Unrecognized command '$1'"136 echo >&2 "Unrecognized command '$1'"
137 exit 1137 exit 1
138 ;;138 ;;
139esac139esac