| OLD | NEW |
| 1 # Copyright 2012 the V8 project authors. All rights reserved. | 1 # Copyright 2012 the V8 project authors. All rights reserved. |
| 2 # Redistribution and use in source and binary forms, with or without | 2 # Redistribution and use in source and binary forms, with or without |
| 3 # modification, are permitted provided that the following conditions are | 3 # modification, are permitted provided that the following conditions are |
| 4 # met: | 4 # met: |
| 5 # | 5 # |
| 6 # * Redistributions of source code must retain the above copyright | 6 # * Redistributions of source code must retain the above copyright |
| 7 # notice, this list of conditions and the following disclaimer. | 7 # notice, this list of conditions and the following disclaimer. |
| 8 # * Redistributions in binary form must reproduce the above | 8 # * Redistributions in binary form must reproduce the above |
| 9 # copyright notice, this list of conditions and the following | 9 # copyright notice, this list of conditions and the following |
| 10 # disclaimer in the documentation and/or other materials provided | 10 # disclaimer in the documentation and/or other materials provided |
| (...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 169 while [ "$ANSWER" != "LGTM" ] ; do | 169 while [ "$ANSWER" != "LGTM" ] ; do |
| 170 [[ -n "$ANSWER" ]] && echo "That was not 'LGTM'." | 170 [[ -n "$ANSWER" ]] && echo "That was not 'LGTM'." |
| 171 echo -n "> " | 171 echo -n "> " |
| 172 read ANSWER | 172 read ANSWER |
| 173 done | 173 done |
| 174 } | 174 } |
| 175 | 175 |
| 176 # Takes a file containing the patch to apply as first argument. | 176 # Takes a file containing the patch to apply as first argument. |
| 177 apply_patch() { | 177 apply_patch() { |
| 178 patch -p1 < "$1" > "$PATCH_OUTPUT_FILE" || \ | 178 patch -p1 < "$1" > "$PATCH_OUTPUT_FILE" || \ |
| 179 cat "$PATCH_OUTPUT_FILE" && die "Applying the patch failed." | 179 { cat "$PATCH_OUTPUT_FILE" && die "Applying the patch failed."; } |
| 180 tee < "$PATCH_OUTPUT_FILE" >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE") | 180 tee < "$PATCH_OUTPUT_FILE" >(awk '{print $NF}' >> "$TOUCHED_FILES_FILE") |
| 181 rm "$PATCH_OUTPUT_FILE" | 181 rm "$PATCH_OUTPUT_FILE" |
| 182 } | 182 } |
| 183 | 183 |
| 184 stage_files() { | 184 stage_files() { |
| 185 # Stage added and modified files. | 185 # Stage added and modified files. |
| 186 TOUCHED_FILES=$(cat "$TOUCHED_FILES_FILE") | 186 TOUCHED_FILES=$(cat "$TOUCHED_FILES_FILE") |
| 187 for FILE in $TOUCHED_FILES ; do | 187 for FILE in $TOUCHED_FILES ; do |
| 188 git add "$FILE" | 188 git add "$FILE" |
| 189 done | 189 done |
| 190 # Stage deleted files. | 190 # Stage deleted files. |
| 191 DELETED_FILES=$(git status -s -uno --porcelain | grep "^ D" \ | 191 DELETED_FILES=$(git status -s -uno --porcelain | grep "^ D" \ |
| 192 | awk '{print $NF}') | 192 | awk '{print $NF}') |
| 193 for FILE in $DELETED_FILES ; do | 193 for FILE in $DELETED_FILES ; do |
| 194 git rm "$FILE" | 194 git rm "$FILE" |
| 195 done | 195 done |
| 196 rm -f "$TOUCHED_FILES_FILE" | 196 rm -f "$TOUCHED_FILES_FILE" |
| 197 } | 197 } |
| OLD | NEW |