status_shown=0
header_shown=0

print_status() {
  if [ $header_shown = 1 -a $status_shown = 0 ]; then
     status_shown=1
     if [ "$1" = 0 ]; then
        echo "SUCCESS"
     else
        echo "FAILURE"
     fi
  fi
}

print_header() {
  print_status 0  
  echo -n "=== $1: "
  header_shown=1
  status_shown=0
}
