OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. |
| 6 |
3 # We should save a change's description when an upload fails. | 7 # We should save a change's description when an upload fails. |
4 | 8 |
5 set -e | 9 set -e |
6 | 10 |
7 . ./test-lib.sh | 11 . ./test-lib.sh |
8 | 12 |
9 # Back up any previously-saved description the user might have. | 13 # Back up any previously-saved description the user might have. |
10 BACKUP_FILE="$HOME/.git_cl_description_backup" | 14 BACKUP_FILE="$HOME/.git_cl_description_backup" |
11 BACKUP_FILE_TMP="$BACKUP_FILE.tmp" | 15 BACKUP_FILE_TMP="$BACKUP_FILE.tmp" |
12 if [ -e "$BACKUP_FILE" ]; then | 16 if [ -e "$BACKUP_FILE" ]; then |
(...skipping 30 matching lines...) Expand all Loading... |
43 | 47 |
44 # Restore the previously-saved description. | 48 # Restore the previously-saved description. |
45 rm -f "$BACKUP_FILE" | 49 rm -f "$BACKUP_FILE" |
46 if [ -e "$BACKUP_FILE_TMP" ]; then | 50 if [ -e "$BACKUP_FILE_TMP" ]; then |
47 mv "$BACKUP_FILE_TMP" "$BACKUP_FILE" | 51 mv "$BACKUP_FILE_TMP" "$BACKUP_FILE" |
48 fi | 52 fi |
49 | 53 |
50 if [ $SUCCESS == 0 ]; then | 54 if [ $SUCCESS == 0 ]; then |
51 echo PASS | 55 echo PASS |
52 fi | 56 fi |
OLD | NEW |