| OLD | NEW |
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # Copyright (c) 2009 The Chromium OS Authors. All rights reserved. | 3 # Copyright (c) 2009 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 # Script to push the output of build_image.sh to a remote image server | 7 # Script to push the output of build_image.sh to a remote image server |
| 8 | 8 |
| 9 # Load common constants. This should be the first executable line. | 9 # TODO(pstew): Apparently the script files are in transition from |
| 10 # The path to common.sh should be relative to your script's location. | 10 # src/scripts to src/scripts/bin. However this state has existed |
| 11 . "$(dirname "$0")/common.sh" | 11 # for months now, therefore we need to look for the common libs in |
| 12 # both places |
| 13 script_root=$(dirname $0) |
| 14 if [ -f ${script_root}/../common.sh ] ; then |
| 15 script_root=${script_root}/.. |
| 16 fi |
| 17 |
| 18 . "${script_root}/common.sh" |
| 12 | 19 |
| 13 # Flags | 20 # Flags |
| 14 DEFINE_string upgrade_server "" "SSH-capable host for upgrade server install" | 21 DEFINE_string upgrade_server "" "SSH-capable host for upgrade server install" |
| 15 DEFINE_string dest_path "" "Directory on host to do install" | 22 DEFINE_string dest_path "" "Directory on host to do install" |
| 16 DEFINE_string client_address "" "IP Address of netbook to update" | 23 DEFINE_string client_address "" "IP Address of netbook to update" |
| 17 DEFINE_string server_address "" "IP Address of upgrade server" | 24 DEFINE_string server_address "" "IP Address of upgrade server" |
| 18 DEFINE_boolean start_server ${FLAGS_TRUE} "Start up the server" | 25 DEFINE_boolean start_server ${FLAGS_TRUE} "Start up the server" |
| 19 DEFINE_boolean stop_server ${FLAGS_FALSE} "Start up the server" | 26 DEFINE_boolean stop_server ${FLAGS_FALSE} "Start up the server" |
| 20 DEFINE_boolean no_copy_archive ${FLAGS_FALSE} "Skip copy of files to server" | 27 DEFINE_boolean no_copy_archive ${FLAGS_FALSE} "Skip copy of files to server" |
| 21 DEFINE_string from "" "Image directory to upload to server" | 28 DEFINE_string from "" "Image directory to upload to server" |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 echo "Running ${SCRIPTS_DIR}/image_to_live.sh $live_args" | 205 echo "Running ${SCRIPTS_DIR}/image_to_live.sh $live_args" |
| 199 ${SCRIPTS_DIR}/image_to_live.sh $live_args & | 206 ${SCRIPTS_DIR}/image_to_live.sh $live_args & |
| 200 else | 207 else |
| 201 echo "Start client upgrade using:" | 208 echo "Start client upgrade using:" |
| 202 echo " ${SCRIPTS_DIR}/image_to_live.sh ${live_args}<client_ip_address>" | 209 echo " ${SCRIPTS_DIR}/image_to_live.sh ${live_args}<client_ip_address>" |
| 203 fi | 210 fi |
| 204 | 211 |
| 205 wait ${server_pid} | 212 wait ${server_pid} |
| 206 fi | 213 fi |
| 207 | 214 |
| OLD | NEW |