author | Patrik Fimml <patrikf@google.com> | 2018-12-05 15:13:14 (GMT) |
---|---|---|
committer | Android Partner Code Review <android-gerrit-partner@google.com> | 2018-12-05 15:13:14 (GMT) |
commit | 7b19b43fdf9220e1fc24bc240ad97b64a3104841 (patch) | |
tree | 0ac9083d28f9193c2887152aa5c23f38d0b37aec | |
parent | 8aafceff482e0e32bf21e7281a7850f63575eb61 (diff) | |
parent | 886349faddeede6bc1a866e9295a6ee5e8930305 (diff) | |
download | common-7b19b43fdf9220e1fc24bc240ad97b64a3104841.zip common-7b19b43fdf9220e1fc24bc240ad97b64a3104841.tar.gz common-7b19b43fdf9220e1fc24bc240ad97b64a3104841.tar.bz2 |
Merge "Make flashall safer to use." into p-tv-dev
-rwxr-xr-x | flash-all.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/flash-all.sh b/flash-all.sh index 822d309..96397a9 100755 --- a/flash-all.sh +++ b/flash-all.sh @@ -14,6 +14,9 @@ # See the License for the specific language governing permissions and # limitations under the License. +set -e +cd $(dirname $0) + lflag="unlock" if [[ $# -gt 0 ]]; then lflag="$1" @@ -31,7 +34,8 @@ fi if [ "$skipreboot" != "skip" ] then - adb $sern reboot fastboot + # Ignore failure, in case we are already in fastboot. + adb $sern reboot fastboot || true fi function flash_with_retry() { @@ -44,7 +48,6 @@ function flash_with_retry() { fastboot ${sern} reboot-bootloader fastboot ${sern} flash ${partition} ${img} fi - return 1 } fastboot $sern flashing unlock_critical |