| OLD | NEW |
| 1 #!/bin/bash | 1 #!/bin/bash |
| 2 # | 2 # |
| 3 # Copyright 2014 The Chromium Authors. All rights reserved. | 3 # Copyright 2014 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 # | 6 # |
| 7 | 7 |
| 8 # Clones the dom-distiller repo, compiles and extracts its javascript Then | 8 # Clones the dom-distiller repo, compiles and extracts its javascript Then |
| 9 # copies that js into the Chromium tree. | 9 # copies that js into the Chromium tree. |
| 10 # This script should be run from the src/ directory and requires that ant is | 10 # This script should be run from the src/ directory and requires that ant is |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 git clone https://code.google.com/p/dom-distiller/ . | 26 git clone https://code.google.com/p/dom-distiller/ . |
| 27 | 27 |
| 28 new_gitsha=$(git rev-parse --short=10 HEAD) | 28 new_gitsha=$(git rev-parse --short=10 HEAD) |
| 29 git log --oneline ${curr_gitsha}.. > $changes | 29 git log --oneline ${curr_gitsha}.. > $changes |
| 30 | 30 |
| 31 echo -n BUG= > $bugs | 31 echo -n BUG= > $bugs |
| 32 | 32 |
| 33 # This extracts BUG= lines from the log, extracts the numbers part, removes | 33 # This extracts BUG= lines from the log, extracts the numbers part, removes |
| 34 # whitespace and deletes empty lines. Then, split on ',', sort, uniquify and | 34 # whitespace and deletes empty lines. Then, split on ',', sort, uniquify and |
| 35 # rejoin. Finally, remove the trailing ',' and concat to $bugs. | 35 # rejoin. Finally, remove the trailing ',' and concat to $bugs. |
| 36 git log \ | 36 git log ${curr_gitsha}.. \ |
| 37 | grep BUG= \ | 37 | grep BUG= \ |
| 38 | sed -e 's/.*BUG=\(.*\)/\1/' -e 's/\s*//g' -e '/^$/d' \ | 38 | sed -e 's/.*BUG=\(.*\)/\1/' -e 's/\s*//g' -e '/^$/d' \ |
| 39 | tr ',' '\n' \ | 39 | tr ',' '\n' \ |
| 40 | sort \ | 40 | sort \ |
| 41 | uniq \ | 41 | uniq \ |
| 42 | tr '\n' ',' \ | 42 | tr '\n' ',' \ |
| 43 | head --bytes=-1 \ | 43 | head --bytes=-1 \ |
| 44 >> $bugs | 44 >> $bugs |
| 45 | 45 |
| 46 echo >> $bugs # add a newline | 46 echo >> $bugs # add a newline |
| (...skipping 15 matching lines...) Expand all Loading... |
| 62 cat $changes | 62 cat $changes |
| 63 echo | 63 echo |
| 64 cat $bugs | 64 cat $bugs |
| 65 | 65 |
| 66 # Run checklicenses.py on the pulled files, but only print the output on | 66 # Run checklicenses.py on the pulled files, but only print the output on |
| 67 # failures. | 67 # failures. |
| 68 tools/checklicenses/checklicenses.py $dom_distiller_js_path > $tmpdir/checklic
enses.out || cat $tmpdir/checklicenses.out | 68 tools/checklicenses/checklicenses.py $dom_distiller_js_path > $tmpdir/checklic
enses.out || cat $tmpdir/checklicenses.out |
| 69 | 69 |
| 70 rm -rf $tmpdir | 70 rm -rf $tmpdir |
| 71 ) | 71 ) |
| OLD | NEW |