5 # Unpacks a directory full of f2c stuff obtained from netlib, naming
6 # the directory f2c-YYYYMMDD (YYYYMMDD being the current date),
7 # leaving it in current working directory.
9 # This shell script downloads the tarball from netlib, unpacks everything,
10 # and strips off the redundant files, leaving a bare-bones (but fully
11 # reproducible) f2c source directory. (You must have yacc/bison to rebuild
12 # gram.c, by the way.)
14 # (C) 1999 Free Software Foundation
15 # Originally by James Craig Burley <craig@jcb-sc.com>, September 1999.
17 # This script is Free Software, and it can be copied, distributed and
18 # modified as defined in the GNU General Public License. A copy of
19 # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
21 # FIXME: Replace WHOAMI with whatever is the canonical way to
22 # obtain the user's email address these days.
24 dir=f2c-`date +%Y%m%d`
31 echo Preparing $dir...
38 if [ ! -f tmp/f2c.tar ]
41 echo Downloading f2c.tar via ftp...
42 ftp -n netlib.bell-labs.com <<EOF
52 echo Unpacking f2c.tar...
56 find . -name "*.gz" -print | sed -e "s:^\(.*\).gz:rm -f \1.Z:g" | sh
57 mv src libf77.gz libi77.gz f2c.1t.gz f2c.h.gz changes.gz disclaimer.gz readme.gz permission.gz ..
61 (cd src; rm -f MD5 MD5.gz gram.c.gz .depend .depend.gz f2c.1.gz index.html index.html.gz; gunzip *.gz)
62 sh libf77 > /dev/null && rm libf77
63 rm -f libF77/xsum0.out libF77/libF77.xsum
64 sh libi77 > /dev/null && rm libi77
65 rm -f libI77/xsum0.out libI77/libI77.xsum
68 cmp f2c.h src/f2c.h && rm -fv src/f2c.h
69 cmp src/readme src/README && rm -fv src/readme
71 echo Deleting f2c.tar...
77 echo Latest f2c now in $dir.