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

Unified Diff: scripts/get_log

Issue 5430006: Include the 5 most recent update engine logs, up to 2000 lines in chrome:system. (Closed) Base URL: ssh://git@gitrw.chromium.org:9222/userfeedback.git@master
Patch Set: Created 10 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « etc/sys_log_utils.lst ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/get_log
diff --git a/scripts/get_log b/scripts/get_log
index ff6dc8111871cbc286e2b39af6c1917ed05cdcaa..0393733b24d84108950f6ad27223f0afe9953f5a 100755
--- a/scripts/get_log
+++ b/scripts/get_log
@@ -9,8 +9,10 @@
# with empty entries that just look broken.
max_lines=${2:-1000}
-
file=$1
+
+[ "$file" = "/dev/stdin" ] && tail --lines=$max_lines "$file" && exit
+
if [ -h "$file" ]; then
file="$(readlink -f $file)"
fi
« no previous file with comments | « etc/sys_log_utils.lst ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698