#!/bin/bash SCRIPT_DIR=$(dirname "$0") # default config should always work for localhost function die() { echo "$1" exit 1 } function dashes() { for ((i=0; i<$1; i++)); do echo -n "-" done echo "" } function centerprint() { # print $1 centered local width=$2 local padding=$(( (width - ${#1}) / 2 )) for ((i=0; i<$padding; i++)); do echo -n " " done echo "$1" } function title() { # determine terminal width TERMINAL_WIDTH=$(tput cols) echo " " dashes $TERMINAL_WIDTH centerprint "$1" $TERMINAL_WIDTH dashes $TERMINAL_WIDTH } # do we have the first argument? if [ -z "$1" ]; then echo "Usage: $0