D.4. docs2andrewgate.sh

#!/bin/sh

# This script copies portions of the distribution documentation to
# andrewgate using ssh.  It should be run from the doc/o directory.

DISDIR=/cogent/incoming

D=`pwd`
B=`basename "${D}"`
      
if [ ${B} != "o" ]; then
    echo "
    Please cd to doc/o.
    "
    exit 1
fi

cd ../distribution/
ls

echo 'Copying new HTML CogentDocs booksets to andrewgate:/cogent/incoming/...'
scp CogentDocs*HTML* andrewgate:${DISDIR}
echo ' '
echo 'Copying new QNX Help CogentDocs booksets to andrewgate:/cogent/incoming/...'
#scp CogentDocs*Help* andrewgate:${DISDIR}
echo ' '
echo 'Copying new PDF books to andrewgate:/cogent/incoming/...'
#scp *PDF* andrewgate:${DISDIR}
echo ' ' 
echo 'Copying new examples to andrewgate:/cogent/incoming/...'
#scp *Examples* andrewgate:${DISDIR}
echo ' '


#echo 'Updating andrewgate:/cogent/web/cogentdocs'
ssh andrewgate "cp ${DISDIR}/CogentDocs*HTML* /cogent/web/newdocs.tgz
                rm -fr /cogent/web/cogentdocs/;
		cd /cogent/web/; tar -xzf newdocs.tgz; exit"
echo ' '
echo 'Done'

# To do it manually, use this:

# cp /cogent/incoming/CogentDocs*HTML* /cogent/web/newdocs.tgz
# rm -fr /cogent/web/cogentdocs/
# cd /cogent/web/; tar -xzf newdocs.tgz