#! /bin/bash
#
# The System Manager
# An Administration Tool For UNIX
#
# Copyright (c) 1994 Stuart Herbert
# Released under the GNU GPL v2
#
# Bugs/comments/contributions to S.Herbert@Sheffield.ac.uk

function main()
{
  local ReadNews
  
  ReadNews="FALSE"
  if [ -f $SysmanFile1 ]; then rm -f $SysmanFile1 ; fi
  touch $SysmanFile1
  
  for x in /var/news/* ; do
    if [ -f $x -a -r $x ]; then
      ReadNews="TRUE"
      TextBox $x
    fi
  done
  
  if [ "$ReadNews" = "TRUE" ]; then
    touch $HOME/.sysman.news
  else
    Abort "There is no news!"
  fi
}

# main code
if [ -n "$1" ]; then
  case "$1" in
    --SysmanInstall)
      echo "Y : Y : OLD : Read Old News :"
      exit
      ;;
    --SysmanAuthor)
      echo "OLD : Read Any News"
      echo "Copyright (c) 1994 Stuart Herbert"
      exit
      ;;
  esac
else
  main
fi

# clean up here
for x in $SysmanFile1 $SysmanFile2 $SysmanFile3 ; do
  if [ -f $x ]; then rm -f $x ; fi
done

# that's it, folks
