#!/bin/sh ######################################################################### # # FILE : cvseditors # DATE : 10.07.2001 # AUTHOR : Patrick Meier / patrick.meier@profidatagroup.com # DESCRIPTION : show all editors # # Copyrigth (C) 2001 by Patrick Meier, Switzerland # ######################################################################### PN=`basename "$0"` CVS=/usr/local/bin/cvs-1.11.1p1-SUNOS-5.6 CVSPARAMETER= STARTSTRING="==>" export CVS ######################################################################### # Usage ######################################################################### Usage() { echo "$PN - show all editors" echo "usage: $PN [-d cvs-root] [editor...]" exit 1 } ######################################################################### # ParameterFailed ######################################################################### ParameterFailed() { echo "${STARTSTRING}Parameter faild: $1 ..."; echo "" Usage } ######################################################################### # get all cvs editors ######################################################################### getEditors() { $CVS editors | awk ' { print $2" ("$3" "$4" "$5" "$6" "$7")\t"$1 }' } ######################################################################### # main ######################################################################### while [ $# -gt 0 ] do case "$1" in -d) if [ $# -gt 1 ] ; then CVSROOT="$2"; shift; else ParameterFailed $1; fi;; -h) Usage; exit 1;; -*) Usage; exit 1;; *) break;; esac shift done if [ $# -lt 1 ] then getEditors else for i in $@ do getEditors | grep "$i" done fi ######################################################################### # EOF #########################################################################