Message ID | 1402280200-21834-2-git-send-email-yamada.m@jp.panasonic.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/scripts/objdiff b/scripts/objdiff index b3e4f10..b8f7fc6 100755 --- a/scripts/objdiff +++ b/scripts/objdiff @@ -25,17 +25,15 @@ # # Note: 'make mrproper' will also remove .tmp_objdiff -GIT_DIR="`git rev-parse --git-dir`" +SRCTREE=$(git rev-parse --show-toplevel 2>/dev/null) -if [ -d "$GIT_DIR" ]; then - TMPD="${GIT_DIR%git}tmp_objdiff" - - [ -d "$TMPD" ] || mkdir "$TMPD" -else - echo "ERROR: git directory not found." +if [ -z "$SRCTREE" ]; then + echo "ERROR: Not a git repository." exit 1 fi +TMPD=$SRCTREE/.tmp_objdiff + usage() { echo "Usage: $0 <command> <args>" echo " record <list of object files>"