mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-06 05:06:29 +00:00
scripts: objdiff: direct error messages to stderr
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Jason Cooper <jason@lakedaemon.net> Signed-off-by: Michal Marek <mmarek@suse.cz>
This commit is contained in:
parent
fd6e124233
commit
5ab370e91a
@ -28,17 +28,17 @@
|
|||||||
SRCTREE=$(git rev-parse --show-toplevel 2>/dev/null)
|
SRCTREE=$(git rev-parse --show-toplevel 2>/dev/null)
|
||||||
|
|
||||||
if [ -z "$SRCTREE" ]; then
|
if [ -z "$SRCTREE" ]; then
|
||||||
echo "ERROR: Not a git repository."
|
echo >&2 "ERROR: Not a git repository."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TMPD=$SRCTREE/.tmp_objdiff
|
TMPD=$SRCTREE/.tmp_objdiff
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 <command> <args>"
|
echo >&2 "Usage: $0 <command> <args>"
|
||||||
echo " record <list of object files>"
|
echo >&2 " record <list of object files>"
|
||||||
echo " diff <commitA> <commitB>"
|
echo >&2 " diff <commitA> <commitB>"
|
||||||
echo " clean all | <commit>"
|
echo >&2 " clean all | <commit>"
|
||||||
exit 1
|
exit 1
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -88,12 +88,12 @@ dodiff() {
|
|||||||
DSTD="$TMPD/$DST"
|
DSTD="$TMPD/$DST"
|
||||||
|
|
||||||
if [ ! -d "$SRCD" ]; then
|
if [ ! -d "$SRCD" ]; then
|
||||||
echo "ERROR: $SRCD doesn't exist"
|
echo >&2 "ERROR: $SRCD doesn't exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -d "$DSTD" ]; then
|
if [ ! -d "$DSTD" ]; then
|
||||||
echo "ERROR: $DSTD doesn't exist"
|
echo >&2 "ERROR: $DSTD doesn't exist"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -112,7 +112,7 @@ doclean() {
|
|||||||
if [ -d "$TMPD/$CMT" ]; then
|
if [ -d "$TMPD/$CMT" ]; then
|
||||||
rm -rf $TMPD/$CMT
|
rm -rf $TMPD/$CMT
|
||||||
else
|
else
|
||||||
echo "$CMT not found"
|
echo >&2 "$CMT not found"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ case "$1" in
|
|||||||
doclean $*
|
doclean $*
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Unrecognized command '$1'"
|
echo >&2 "Unrecognized command '$1'"
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user