#! /bin/csh -f
#
# script to create an entryname index for the swissprot newdata library
#

echo "swissentryname.script Version 1.0"
echo ""

set RM = "/bin/rm -f"
set SORT = sort

#
# LIBFILE is the name you've given to the library file
#
set LIBFILE = seq.dat

# get entry names
emblentryname1 $LIBFILE entry.list 1
if ( $status ) goto abort

# sort on entry names
${SORT} entry.list >! entry.sorted
if ( $status ) goto abort
${RM} entry.list

# create index file
entryname2 entry.sorted entrynam.idx
if ( $status ) goto abort
${RM} entry.sorted

echo "Completion successful"
echo ""

exit 0

#
# Abort
#
abort:
echo "swissentryname.script: aborting due to serious error"
exit 2
