github.com/dahs81/otto@v0.2.1-0.20160126165905-6400716cf085/builtin/scriptpack/stdlib/data/apt.sh (about)

     1  # apt_update_once can be called to run apt_update exactly once. This
     2  # will create a temporary file in /tmp to prevent it from happening again.
     3  apt_update_once() {
     4      if [ ! -f "/tmp/otto_apt_update_sentinel" ]; then
     5          apt_update
     6      fi
     7  }
     8  
     9  # apt_update updates the apt cache
    10  apt_update() {
    11      oe sudo apt-get update
    12  }
    13  
    14  # apt_install is a helper to install packages silently
    15  apt_install() {
    16      export DEBIAN_FRONTEND=noninteractive
    17      oe sudo apt-get install -y $@
    18  }