#! /bin/csh -f umask 2 set hpath = /html set html = /www/tartarus/html set html_res = /www/tartarus/restricted/html set ftp = /www/tartarus/ftp set ftp_res = /www/tartarus/restricted/ftp set doc = /www/tartarus/doc set seqs = `cat $doc/public.list` echo " " echo "WARNING:" echo "This script will delete all existing public sequences," echo "and fill up the public directory tree with sequences" echo "from the restricted area according to public.list." echo " " echo -n "Do you want to continue? (y/n) " set ans = $< if ( $ans != y ) exit echo "Deleting all PUBLIC sequences..." \rm -rf $ftp/7* $ftp/6* \rm -rf $html/7* $html/6* echo "Updating the PUBLIC database..." echo " " foreach seq ( $seqs ) if ( -e $html_res/$seq/$seq.html ) then echo -n $seq" " mkdir $ftp/$seq ; chgrp gnt $ftp/$seq ; chmod g+w $ftp/$seq mkdir $html/$seq ; chgrp gnt $html/$seq ; chmod g+w $html/$seq \ln $html_res/$seq/* $html/$seq/ \ln $ftp_res/$seq/* $ftp/$seq/ cat $html/$seq/$seq.html | sed s/=\\\"\\\/restricted/=\\\"/g > $html/$seq/$seq.tmp mv $html/$seq/$seq.tmp $html/$seq/$seq.html else echo " " ; echo "ERROR: Sequence $seq does not exist in the restricted area." endif end echo " "; echo " " $doc/make_public_index