
USERID=`/usr/local/bin/whoami`


# better to check CVS/Entries
if [ -f CVS/Tag ]; then    # on a branch

  TAG=`head CVS/Tag`


  if [ "${TAG}" = "TPatch" ]; then
    if [ "{USERID}" = "dislam" ]; then
      echo "OK to commit ..."
      exit 0
    else
      echo "No checkins allowed on this branch by you"
      exit 1
    fi

  # write the same tedious code for each branch
    

  else
    echo "OK to commit ..."
    exit 0    
  fi


else  # on main trunk

  # Need to be Mohamed or Danial to check into main trunk
  
  if [ "${USERID}" = "dislam" -o "${USERID}" = "melgemai" ]; then
    echo ${USERID} has permission to check into main trunk
    exit 0
    
  else  
    echo "You don't have permission to change files on main trunk!"
    exit 1
  fi

fi  
