OLD | NEW |
1 #!/bin/bash | 1 #!/bin/bash |
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 # Helper script that mounts chromium os image from a device or directory | 7 # Helper script that mounts chromium os image from a device or directory |
8 # and creates mount points for /var and /usr/local (if in dev_mode). | 8 # and creates mount points for /var and /usr/local (if in dev_mode). |
9 | 9 |
10 . "$(dirname "$0")/common.sh" | 10 . "$(dirname "$0")/common.sh" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 fi | 132 fi |
133 echo "Image specified by ${FLAGS_from} mounted at"\ | 133 echo "Image specified by ${FLAGS_from} mounted at"\ |
134 "${FLAGS_rootfs_mountpt} successfully." | 134 "${FLAGS_rootfs_mountpt} successfully." |
135 } | 135 } |
136 | 136 |
137 # Find the last image built on the board. | 137 # Find the last image built on the board. |
138 if [ ${FLAGS_most_recent} -eq ${FLAGS_TRUE} ] ; then | 138 if [ ${FLAGS_most_recent} -eq ${FLAGS_TRUE} ] ; then |
139 FLAGS_from="$(./get_latest_image.sh --board="${FLAGS_board}")" | 139 FLAGS_from="$(./get_latest_image.sh --board="${FLAGS_board}")" |
140 fi | 140 fi |
141 | 141 |
142 # Turn path into an absolute path. | 142 # Turn paths into absolute paths. |
143 FLAGS_from=`eval readlink -f ${FLAGS_from}` | 143 FLAGS_from=`eval readlink -f ${FLAGS_from}` |
| 144 FLAGS_rootfs_mountpt=`eval readlink -f ${FLAGS_rootfs_mountpt}` |
| 145 FLAGS_stateful_mountpt=`eval readlink -f ${FLAGS_stateful_mountpt}` |
144 | 146 |
145 # Perform desired operation. | 147 # Perform desired operation. |
146 if [ ${FLAGS_unmount} -eq ${FLAGS_TRUE} ] ; then | 148 if [ ${FLAGS_unmount} -eq ${FLAGS_TRUE} ] ; then |
147 unmount_image | 149 unmount_image |
148 else | 150 else |
149 mount_image | 151 mount_image |
150 fi | 152 fi |
OLD | NEW |