Sha256: 2ebec6a391a9044a06d4c0586b76f9b233ce62ae4d3ae8c3ea69f9f309c2434b

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

#!/bin/bash

# Main install script. mission scripts get appended to this when executing
# bundle exec gearship setup_host

# Exit immediately if a pipeline returns a non-zero status.
# (unless part of the test in an if statement)
set -e

export DEBIAN_FRONTEND=noninteractive
 
# Mute STDOUT and STDERR
function gearship.mute() {
  echo "Running \"$@\""
  `$@ >/dev/null 2>&1`
  return $?
}

function gearship.installed() {
  dpkg -s $@ >/dev/null 2>&1
  return $?
}

function gearship.install() {
  if gearship.installed "$@"; then
    echo "$@ already installed"
    return 1
  else
    echo "No packages found matching $@. Installing..."
    gearship.mute "apt-get -y install $@"
    return 0
  fi
}

echo "
       ___                      _     _       
      / __| ___  __ _  _ _  ___| |_  (_) _ __ 
     | (_ |/ -_)/ _\` || '_|(_-<| ' \ | || '_ \\
      \___|\___|\__,_||_|  /__/|_||_||_|| .__/
                                        |_|   
                                              
                ___  _ _    __ _              
               / _ \| ' \  / _\` |             
               \___/|_||_| \__,_|             
                                              
                _          _             _    
         _ __  (_) ___ ___(_) ___  _ _  | |   
        | '  \ | |(_-<(_-<| |/ _ \| ' \ |_|   
        |_|_|_||_|/__//__/|_|\___/|_||_|(_)   
                                              

"

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
gearship-0.2.3 lib/templates/gearship.sh
gearship-0.2.2 lib/templates/gearship.sh
gearship-0.2.1 lib/templates/gearship.sh
gearship-0.2.0 lib/templates/gearship.sh
gearship-0.1.4 lib/templates/gearship.sh
gearship-0.1.3 lib/templates/gearship.sh