summaryrefslogtreecommitdiff
path: root/tools/replay_log
diff options
context:
space:
mode:
authorAndrew de los Reyes <adlr@chromium.org>2013-03-27 15:31:59 -0700
committerChromeBot <chrome-bot@google.com>2013-03-27 19:59:28 -0700
commitec2c3b1dd7f93bf2083fbd1b9ba097af702edcc7 (patch)
tree685c838f8e2da49687318a8bf66a2ff08afcb719 /tools/replay_log
parent720b0f88ea98c5e1605a23a97fc6d2451797697f (diff)
downloadlibchrome-gestures-ec2c3b1dd7f93bf2083fbd1b9ba097af702edcc7.tar.gz
replay_log: Support for new .zip report logs
BUG=chromium:224451 TEST=Manually ran tool to fetch logs Change-Id: Id5319d37e8dd6cefa5e1a69b3e84f27d84c0fa7c Reviewed-on: https://gerrit.chromium.org/gerrit/46704 Reviewed-by: Dennis Kempin <denniskempin@chromium.org> Commit-Queue: Andrew de los Reyes <adlr@chromium.org> Tested-by: Andrew de los Reyes <adlr@chromium.org>
Diffstat (limited to 'tools/replay_log')
-rwxr-xr-xtools/replay_log12
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/replay_log b/tools/replay_log
index ef4fd49..bfdca70 100755
--- a/tools/replay_log
+++ b/tools/replay_log
@@ -75,8 +75,8 @@ binarydata/${LOG_FILE}?id=${LOG_IDNUM}&logIndex=0"
while true; do
http_proxy=http://cache.corp.google.com:3128/ curl -b "$COOKIE_FILE" \
-L -o "$LOG_FILE" "$LOG_URL"
- TYPE="$(file "$LOG_FILE")"
- if [[ "$TYPE" = *bzip2* ]]; then
+ TYPE="$(file -b "$LOG_FILE" | cut -d ' ' -f 1)"
+ if [[ "$TYPE" = bzip2 || "$TYPE" = Zip ]]; then
# download success
infile="$LOG_FILE"
break
@@ -112,10 +112,14 @@ expand_input_file() {
intype="ASCII"
fi
- if [ "$intype" = "bzip2" ]; then
+ if [ "$intype" = "bzip2" -o "$intype" = "Zip" ]; then
# Expand to the bzip2ed file within
local raw_text_log="raw_text_log.txt"
- bzcat "$infile" > "$raw_text_log"
+ CAT=bzcat
+ if [ "$intype" = "Zip" ]; then
+ CAT=zcat
+ fi
+ $CAT "$infile" > "$raw_text_log"
cp "$raw_text_log" "full_feedback_log.txt"
if fgrep -q hack-33025-touchpad_activity "$raw_text_log"; then
# Expand the hack touchpad activity log