Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(55)

Side by Side Diff: bin/cros_package_to_live

Issue 3331007: remote_cp renamed to remote_cp_to. *shrug* (Closed) Base URL: ssh://gitrw.chromium.org/crosutils.git
Patch Set: Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 # Script to update a running device with an optionally built package out 7 # Script to update a running device with an optionally built package out
8 # of your build directory 8 # of your build directory
9 9
10 # Load common constants. This should be the first executable line. 10 # Load common constants. This should be the first executable line.
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 if [ -z "${latest_pkg}" ]; then 67 if [ -z "${latest_pkg}" ]; then
68 echo "Could not find latest built version of ${pkg}" 68 echo "Could not find latest built version of ${pkg}"
69 exit 1 69 exit 1
70 fi 70 fi
71 pkg_dir=$(basename $(dirname $latest_pkg)) 71 pkg_dir=$(basename $(dirname $latest_pkg))
72 pkg_name=$(basename $latest_pkg) 72 pkg_name=$(basename $latest_pkg)
73 echo "Installing ${latest_pkg}..." 73 echo "Installing ${latest_pkg}..."
74 74
75 remote_sh "mktemp -d /tmp/cros_package_to_live.XXXX" 75 remote_sh "mktemp -d /tmp/cros_package_to_live.XXXX"
76 temp_dir=$REMOTE_OUT 76 temp_dir=$REMOTE_OUT
77 remote_cp "${latest_pkg}" "${temp_dir}" 77 remote_cp_to "${latest_pkg}" "${temp_dir}"
78 remote_sh "mount -o remount,rw /" 78 remote_sh "mount -o remount,rw /"
79 remote_sh "mkdir -p /usr/portage/packages/${pkg_dir} && 79 remote_sh "mkdir -p /usr/portage/packages/${pkg_dir} &&
80 mv ${temp_dir}/${pkg_name} /usr/portage/packages/${pkg_dir} && 80 mv ${temp_dir}/${pkg_name} /usr/portage/packages/${pkg_dir} &&
81 env FEATURES=-sandbox emerge --usepkg \ 81 env FEATURES=-sandbox emerge --usepkg \
82 /usr/portage/packages/${pkg_dir}/${pkg_name} 1>&2" 82 /usr/portage/packages/${pkg_dir}/${pkg_name} 1>&2"
83 echo "${pkg} has been installed" 83 echo "${pkg} has been installed"
84 remote_sh "rm -rf ${temp_dir}" 84 remote_sh "rm -rf ${temp_dir}"
85 remote_sh "mount -o remount,ro /" || /bin/true 85 remote_sh "mount -o remount,ro /" || /bin/true
86 done 86 done
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698