Home | History | Annotate | Download | only in common
      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 # TODO
      8 # - handle other distros (e.g. non-apt).
      9 
     10 @@include@@apt.include
     11 
     12 if [ -x "$APT_GET" ]; then
     13   update_sources_lists
     14   # If the repo was just added, force a cache update.
     15   if [ $? -eq 1 ]; then
     16     install_key
     17     "$APT_GET" -qq update
     18   fi
     19 
     20   # TODO(mmoss) detect if apt cache is stale (> 1 day) and force update?
     21 
     22   # Just try to install the packge. If it's already installed, apt-get won't do
     23   # anything.
     24   "$APT_GET" install -y -q @@PACKAGE@@
     25 fi
     26 
     27