#!/bin/bash

DONE="[  done  ]"
FAIL="[  fail  ]"

DOTSTRING=""
cols=`tput cols`
cols=$((cols - 10))
cols=$((cols / 2))
for i in `seq 1 $cols`; do
    DOTSTRING=$DOTSTRING"."
done
function align_left() {
    local chars="$1"
    local str="${@:2}"
    echo -n ${str}${chars:${#str}}
}

function align_echo() {
    if [[ "$1" != 0 ]]; then
        echo $FAIL
        echo "$2"
    else
        echo $DONE
    fi
}
