#!/bin/bash

declare phase=$1
declare status_dir="/proj/ops/ssi/$phase/bin/status"

# Should cd only once...

while [ true ]; do

    clear

    echo "############################################"
    echo "## Pipeline status for <$phase>"
    echo "##"
    echo `/bin/date`
    echo ""
  
    for s in $status_dir/*.status; do 
	cat $s
	echo ""
    done

    echo ""
    pushd $status_dir > /dev/null
    #ls -g *.status
    #ls -ltr *.status
    /bin/ls -g *.status
    popd > /dev/null

    sleep 6
done