| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. | 2 # Copyright (c) 2010 The Chromium OS Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 # All scripts should die on error unless commands are specifically excepted | 6 # All scripts should die on error unless commands are specifically excepted |
| 7 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. | 7 # by prefixing with '!' or surrounded by 'set +e' / 'set -e'. |
| 8 set -e | 8 set -e |
| 9 # Clean up on regular or error exits. | 9 # Clean up on regular or error exits. |
| 10 trap clean_temp EXIT | 10 trap clean_temp EXIT |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 103 --sb_extract) | 103 --sb_extract) |
| 104 make_temp | 104 make_temp |
| 105 echo "The resources are extracted into: $TMP_DIR" | 105 echo "The resources are extracted into: $TMP_DIR" |
| 106 untar_and_chdir "$SELF" | 106 untar_and_chdir "$SELF" |
| 107 # Don't remove the temporary folder on exit. | 107 # Don't remove the temporary folder on exit. |
| 108 TMP_DIR="" | 108 TMP_DIR="" |
| 109 exit 0 | 109 exit 0 |
| 110 ;; | 110 ;; |
| 111 --force) | 111 --force) |
| 112 force_flag=1 | 112 force_flag=1 |
| 113 shift |
| 113 ;; | 114 ;; |
| 114 -h|"-?"|--help) | 115 -h|"-?"|--help) |
| 115 echo "Shellball -- self-extract and install" | 116 echo "Shellball -- self-extract and install" |
| 116 echo "" | 117 echo "" |
| 117 echo "Usage: $SELF [options] [-- [inside-script-options]]" | 118 echo "Usage: $SELF [options] [-- [inside-script-options]]" |
| 118 echo "" | 119 echo "" |
| 119 echo "options:" | 120 echo "options:" |
| 120 echo " -h show usage help" | 121 echo " -h show usage help" |
| 121 echo " -V show version of containing files" | 122 echo " -V show version of containing files" |
| 122 echo " --sb_check check content integrity" | 123 echo " --sb_check check content integrity" |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 fi | 190 fi |
| 190 fi | 191 fi |
| 191 | 192 |
| 192 verbose_message "Run built-in script ($SCRIPT) ..." | 193 verbose_message "Run built-in script ($SCRIPT) ..." |
| 193 if ! $SCRIPT "$@"; then | 194 if ! $SCRIPT "$@"; then |
| 194 error_exit "ERROR: $SCRIPT failed." | 195 error_exit "ERROR: $SCRIPT failed." |
| 195 fi | 196 fi |
| 196 exit 0 | 197 exit 0 |
| 197 | 198 |
| 198 # Below are uuencoded blob. Don't put code behind exit 0. | 199 # Below are uuencoded blob. Don't put code behind exit 0. |
| OLD | NEW |