Find tags in this directories and below

This commit is contained in:
zimoch
2004-05-28 14:02:02 +00:00
parent 41bfd5057f
commit 5364ac9cba
Executable
+65
View File
@@ -0,0 +1,65 @@
case "$1" in
-h | -\? | --help)
echo "usage: showtags"
echo " Find CVS tags in this directory and subdirectories"
echo " If there is a connection to psip0 (Oracle 9) you get date and time info too"
exit 0
;;
-v | --version)
echo '$Author: zimoch $'
echo '$Date: 2004/05/28 14:02:02 $'
echo '$Source: /cvs/G/EPICS/App/scripts/showtags,v $'
exit 0
;;
-*)
echo "Unknown option $1. Try: -h, --help, -v, --version"
exit 1
;;
esac
export ORACLE_HOME=/usr/oracle-9.2
trap "stty echo" EXIT SIGTERM SIGKILL
TAGS=$(cvs status -v 2>/dev/null | awk '
/\(revision:/ {tag[$1]=1}
END {for (i in tag) { print i}}
')
if [ -d $ORACLE_HOME ]
then
function jointags()
{
echo -n \'$1\'
shift
while [ $# != 0 ]
do
echo -n ,\'$1\'
shift
done
echo
}
TAGLIST=$(jointags $TAGS)
$ORACLE_HOME/bin/sqlplus -s ssrm_public/pub01@psip0 << EOF
SET PAGESIZE 10000;
SET LINESIZE 1000;
SET SPACE 2;
SET FEEDBACK OFF;
SELECT TAG_NAME AS "Tag",
TAG_DATE AS "Date",
TAG_TIME AS "Time"
FROM SSRM.CVS_TAGS_VIEW
WHERE TAG_NAME IN ($TAGLIST)
ORDER BY TO_DATE(TAG_DATE||' '||TAG_TIME,'DD-MM-YYYY HH24:MI');
EXIT
EOF
else
echo "$TAGS" | sort
fi