Skip to content

Commit

Permalink
scripts: objdiff: direct error messages to stderr
Browse files Browse the repository at this point in the history
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Jason Cooper <[email protected]>
Signed-off-by: Michal Marek <[email protected]>
  • Loading branch information
masahir0y authored and michal42 committed Jun 10, 2014
1 parent fd6e124 commit 5ab370e
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions scripts/objdiff
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,17 @@
SRCTREE=$(git rev-parse --show-toplevel 2>/dev/null)

if [ -z "$SRCTREE" ]; then
echo "ERROR: Not a git repository."
echo >&2 "ERROR: Not a git repository."
exit 1
fi

TMPD=$SRCTREE/.tmp_objdiff

usage() {
echo "Usage: $0 <command> <args>"
echo " record <list of object files>"
echo " diff <commitA> <commitB>"
echo " clean all | <commit>"
echo >&2 "Usage: $0 <command> <args>"
echo >&2 " record <list of object files>"
echo >&2 " diff <commitA> <commitB>"
echo >&2 " clean all | <commit>"
exit 1
}

Expand Down Expand Up @@ -88,12 +88,12 @@ dodiff() {
DSTD="$TMPD/$DST"

if [ ! -d "$SRCD" ]; then
echo "ERROR: $SRCD doesn't exist"
echo >&2 "ERROR: $SRCD doesn't exist"
exit 1
fi

if [ ! -d "$DSTD" ]; then
echo "ERROR: $DSTD doesn't exist"
echo >&2 "ERROR: $DSTD doesn't exist"
exit 1
fi

Expand All @@ -112,7 +112,7 @@ doclean() {
if [ -d "$TMPD/$CMT" ]; then
rm -rf $TMPD/$CMT
else
echo "$CMT not found"
echo >&2 "$CMT not found"
fi
fi
}
Expand All @@ -133,7 +133,7 @@ case "$1" in
doclean $*
;;
*)
echo "Unrecognized command '$1'"
echo >&2 "Unrecognized command '$1'"
exit 1
;;
esac

0 comments on commit 5ab370e

Please sign in to comment.