diff options
Diffstat (limited to 'chrome/installer/linux/common/updater')
-rwxr-xr-x | chrome/installer/linux/common/updater | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/installer/linux/common/updater b/chrome/installer/linux/common/updater new file mode 100755 index 0000000..53a8a80 --- /dev/null +++ b/chrome/installer/linux/common/updater @@ -0,0 +1,26 @@ +#!/bin/sh +# +# Copyright (c) 2009 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# TODO +# - handle other distros (e.g. non-apt). + +@@include@@apt.include + +if [ -x "$APT_GET" ]; then + update_sources_lists + # If the repo was just added, force a cache update. + if [ $? -eq 1 ]; then + install_key + "$APT_GET" -qq update + fi + + # TODO(mmoss) detect if apt cache is stale (> 1 day) and force update? + + # Just try to install the packge. If it's already installed, apt-get won't do + # anything. + "$APT_GET" install -y -q @@PACKAGE@@ +fi + |