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

Unified Diff: build/linux/dump_app_syms

Issue 126062: Cleanups from post-submit suggestions. (Closed)
Patch Set: more cleanups Created 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | build/linux/dump_signature.py » ('j') | build/linux/dump_signature.py » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/linux/dump_app_syms
diff --git a/build/linux/dump_app_syms b/build/linux/dump_app_syms
index 85544be2cbeed467aa539b83bfcadd4940b0d2c2..1ebac5889fce0e0f8e48e9924ff6b83d4b166678 100755
--- a/build/linux/dump_app_syms
+++ b/build/linux/dump_app_syms
@@ -10,7 +10,7 @@
set -e
usage() {
- echo "$0 <dump_syms_exe> <binary_with_symbols> <symbols_output>"
+ echo "$0 <dump_syms_exe> <binary_with_symbols> <symbols_output>" >&2
}
@@ -26,12 +26,14 @@ OUTFILE="$3"
STRIPPED=$(mktemp -q -t stripped-XXXXX)
if [ $? -ne 0 ]; then
- echo "ERROR: Could not create temp stripped '$INFILE'"
+ echo "ERROR: Could not create temp stripped '$INFILE'" >&2
exit 1
fi
# Dump the symbols from the given binary.
-"$DUMPSYMS" "$INFILE" > "$OUTFILE"
+if [ "$INFILE" -nt "$OUTFILE" ]; then
+ "$DUMPSYMS" "$INFILE" > "$OUTFILE"
+fi
# Strip the binary and calculate the signature of that, since that's what ships.
strip "$INFILE" -o "$STRIPPED"
@@ -39,6 +41,4 @@ NEWSIG=$("$SCRIPTDIR/dump_signature.py" "$STRIPPED")
rm "$STRIPPED"
# Replace the old signature with the stripped signature in the symbols file.
-INFILE_BASE=$(basename "$INFILE")
-sed -i "1s/[0-9A-F]* $INFILE_BASE/$NEWSIG $INFILE_BASE/" "$OUTFILE"
-
+sed -i "1s/ [0-9A-F]* / $NEWSIG /" "$OUTFILE"
« no previous file with comments | « no previous file | build/linux/dump_signature.py » ('j') | build/linux/dump_signature.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698