Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: webrtc/tools/author_line_count

Issue 2061683002: New misc scripts, header_usage.sh and author_line_count.sh. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | webrtc/tools/header_usage » ('j') | webrtc/tools/header_usage » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #! /bin/sh
kjellander_webrtc 2016/06/13 12:49:52 Provide a brief description.
kjellander_webrtc 2016/06/13 12:49:52 Change to #!/bin/bash
nisse-webrtc 2016/06/14 09:38:47 Done.
kjellander_webrtc 2016/06/14 14:11:12 Not done :) Still needs to remove the space.
nisse-webrtc 2016/06/15 06:55:23 Ok. That's unorthodox, script files are traditiona
2
3 AUTHOR=$1
4 if [ -z "$AUTHOR" ] ; then
kjellander_webrtc 2016/06/13 12:49:51 Prefer brace-quoting of multiple-character variabl
kjellander_webrtc 2016/06/13 12:49:52 Use [[ ]] style test. https://engdoc.corp.google.c
nisse-webrtc 2016/06/14 09:38:46 Done.
5 echo "Usage: $0 AUTHOR-PATTERN"
6 exit 1
7 fi
8
9 git log --author="$AUTHOR" --oneline --shortstat | grep '^ ' | gawk '
10 BEGIN { RS=",|\n" }
11 /insertion/ { total += $1 }
12 /deletion/ { total -= $1 }
13 END { print total }
14 '
15
OLDNEW
« no previous file with comments | « no previous file | webrtc/tools/header_usage » ('j') | webrtc/tools/header_usage » ('J')

Powered by Google App Engine
This is Rietveld 408576698