Prev Up
Go backward to 7.1 Making a Local Copy
Go up to 7 Downloading

7.2 Creating a CoFI Mirror

Please note:

On Unix, downloading the main CoFI WWW pages (and installing them in the public_html directory) should be possible using the following script, which creates (or overwrites) the files CoFI and CoFI.tar.gz:

#!/bin/sh

echo Updating CoFI mirror

cd $HOME/public_html

echo -n Starting ftp...

ftp -n -v <<END
open ftp.brics.dk
user anonymous $USER@`domainname`
cd Projects/CoFI
bin
get index.WWW.tar.gz CoFI.tar.gz
bye
END

echo done

echo -n Unpacking...

zcat CoFI.tar.gz | tar -xof -

echo done

Expect both the get command and the unpacking to take several minutes each. (It would be more efficient to check whether the archives have changed since the previous download, but the author is not sufficiently experienced at writing shell scripts...)

The following line in a crontab file should cause the script in $HOME/bin/cofi-mirror to be run each night at 23.30, saving the log in the file $HOME/.cronlog:

30 23 * * * $HOME/bin/cofi-mirror >> $HOME/.cronlog 2>&1

Please choose a different time, to avoid overloading the FTP server unnecessarily!

Suggestions for improvements to the above are welcome!


CoFI : CoFI -- Version:  -- November 16, 1999.
Comments to pdmosses@brics.dk

Prev Up