| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # | 2 # |
| 3 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2010 The Chromium OS 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 # This attempts to guide linux users through the process of putting a recovery | 7 # This attempts to guide linux users through the process of putting a recovery |
| 8 # image onto a removeable USB drive. | 8 # image onto a removeable USB drive. |
| 9 # | 9 # |
| 10 # We may not need root privileges if we have the right permissions. | 10 # We may not need root privileges if we have the right permissions. |
| (...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 416 echo "0 - <quit>" | 416 echo "0 - <quit>" |
| 417 # NOTE: making assumptions about the order of lines in each stanza! | 417 # NOTE: making assumptions about the order of lines in each stanza! |
| 418 while read line; do | 418 while read line; do |
| 419 if echo "$line" | grep -q '^name='; then | 419 if echo "$line" | grep -q '^name='; then |
| 420 echo | 420 echo |
| 421 count=$(( count + 1 )) | 421 count=$(( count + 1 )) |
| 422 echo "$line" | sed "s/name=/$count - /" | 422 echo "$line" | sed "s/name=/$count - /" |
| 423 elif echo "$line" | grep -q '^channel='; then | 423 elif echo "$line" | grep -q '^channel='; then |
| 424 echo "$line" | sed 's/channel=/ channel: /' | 424 echo "$line" | sed 's/channel=/ channel: /' |
| 425 elif echo "$line" | grep -q '^hwid='; then | 425 elif echo "$line" | grep -q '^hwid='; then |
| 426 echo "$line" | sed 's/hwid=/ HWID: /' | 426 echo "$line" | sed 's/hwid=/ model: /' |
| 427 fi | 427 fi |
| 428 done < "$config" | 428 done < "$config" |
| 429 echo | 429 echo |
| 430 show= | 430 show= |
| 431 fi | 431 fi |
| 432 prompt "Please select a recovery image to download: " | 432 prompt "Please select a recovery image to download: " |
| 433 read num | 433 read num |
| 434 if [ -z "$num" ] || [ "$num" = "?" ]; then | 434 if [ -z "$num" ] || [ "$num" = "?" ]; then |
| 435 show=yes | 435 show=yes |
| 436 elif echo "$num" | grep -q '[^0-9]'; then | 436 elif echo "$num" | grep -q '[^0-9]'; then |
| (...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 841 prompt "Shall I remove the temporary files now? [y/n] " | 841 prompt "Shall I remove the temporary files now? [y/n] " |
| 842 read tmp | 842 read tmp |
| 843 case $tmp in | 843 case $tmp in |
| 844 [Yy]*) | 844 [Yy]*) |
| 845 cd | 845 cd |
| 846 \rm -rf ${WORKDIR} | 846 \rm -rf ${WORKDIR} |
| 847 ;; | 847 ;; |
| 848 esac | 848 esac |
| 849 | 849 |
| 850 exit 0 | 850 exit 0 |
| OLD | NEW |