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

Side by Side Diff: webkit/tools/test_shell/mac/keystone_install.sh

Issue 18521: Keystone auto-update support for TestShell (Closed) Base URL: svn://chrome-svn.corp.google.com/chrome/trunk/src/
Patch Set: '' Created 11 years, 11 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 | « webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:executable
+ *
Added: svn:eol-style
+ LF
OLDNEW
(Empty)
1 #!/bin/sh
2
3 # Copyright (c) 2009 The Chromium Authors. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file.
6
7 # Called by the Keystone system to update the installed application with a new
8 # version from a disk image.
9
10 set -e
11
12 # The argument should be the disk image path. Make sure it exists.
13 if [ ! -d "${1}" ] ; then
14 exit 1
15 fi
16
17 # Who we are.
18 APP_NAME="Chromium TestShell.app"
19 SRC="${1}/${APP_NAME}"
20
21 # Sanity, make sure that there's something to copy from.
22 if [ ! -d "${SRC}" ] ; then
23 exit 1
24 fi
25
26 # Figure out where we're going.
27 BUNDLE_ID=$(defaults read "${SRC}/Contents/Info" CFBundleIdentifier)
28 DEST=$(ksadmin -pP "${BUNDLE_ID}" | grep xc= | sed -E 's/.+path=(.+)>$/\1/g')
29
30 # More sanity checking.
31 if [ -z "${SRC}" ] || [ -z "${DEST}" ] || [ ! -d $(dirname "${DEST}") ]; then
32 exit 1
33 fi
34
35 # This usage will preserve any changes the user made to the application name.
36 rsync -a --delete "${SRC}/" "${DEST}/"
37
38 VERSION=$(defaults read "${DEST}/Contents/Info" SVNRevision)
39 URL=$(defaults read "${DEST}/Contents/Info" KSUpdateURL)
40
41 # Notify LaunchServices.
42 /System/Library/Frameworks/CoreServices.framework/Frameworks/LaunchServices.fram ework/Support/lsregister "${DEST}"
43
44 # Notify Keystone.
45 ksadmin -P "${BUNDLE_ID}" \
46 --version "${VERSION}" \
47 --xcpath "${DEST}" \
48 --url "${URL}"
49
50 # Great success!
51 exit 0
OLDNEW
« no previous file with comments | « webkit/tools/test_shell/mac/TestShell.xcodeproj/project.pbxproj ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698