#!/bin/sh
#       copied from .bashrc
#       2017-08-29

RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
BLUE="\[\033[0;34m\]"
MAGENTA="\[\033[0;35m\]"
BW="\[\033[0m\]"
NORMAL="\[\033[0;39m\]"
#TSfmt='\t'
TSfmt='\D{%Y-%m-%d, %R}'
HOST=`hostname | sed 's/\.[a-zA-Z0-9]\+\.edu//'`
if [[ $UID == 0 ]] ;    # UID 0 is the superuser...
then
   PS1="${BLUE}${TSfmt} $RED\u@\h\w$NORMAL\n\!] " ;
elif [[ ${HOST} == 'montcs' ]] ;
then
   PS1="${BLUE}${TSfmt} ${MAGENTA}\h:\w${BLUE}\n\!]${NORMAL} " ;
elif [[ ${HOST} == 'montnet' ]] ;
then
   PS1="${BLUE}${TSfmt} ${GREEN}\h:\w${BLUE}\n\!]${NORMAL} " ;
else
   PS1="${MAGENTA}${TSfmt} $BLUE\h:\w$NORMAL\n\!] " ;
fi
## unset RED GREEN BLUE BW NORMAL