]> gcc.gnu.org Git - gcc.git/blame - contrib/download_f2c
btest-gcc.sh, [...]: Update TARGET comments.
[gcc.git] / contrib / download_f2c
CommitLineData
697f6b2f
CB
1#!/bin/sh
2#
3# download_f2c
4#
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.
8#
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.)
13#
14# (C) 1999 Free Software Foundation
15# Originally by James Craig Burley <craig@jcb-sc.com>, September 1999.
16#
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
20#
21# FIXME: Replace WHOAMI with whatever is the canonical way to
22# obtain the user's email address these days.
23
24dir=f2c-`date +%Y%m%d`
25if [ ! -d $dir ]
26then
27 mkdir $dir
28fi
29cd $dir
30
31echo Preparing $dir...
32
33if [ ! -d tmp ]
34then
35 mkdir tmp
36fi
37
38if [ ! -f tmp/f2c.tar ]
39then
40 cd tmp
41 echo Downloading f2c.tar via ftp...
42 ftp -n netlib.bell-labs.com <<EOF
43 user ftp WHOAMI
44 type binary
45 cd netlib
46 get f2c.tar
47 quit
48EOF
49 cd ..
50fi
51
52echo Unpacking f2c.tar...
53
54tar xf tmp/f2c.tar
55cd f2c
56find . -name "*.gz" -print | sed -e "s:^\(.*\).gz:rm -f \1.Z:g" | sh
57mv src libf77.gz libi77.gz f2c.1t.gz f2c.h.gz changes.gz disclaimer.gz readme.gz permission.gz ..
58cd ..
59rm -fr f2c
60gunzip *.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)
62sh libf77 > /dev/null && rm libf77
63rm -f libF77/xsum0.out libF77/libF77.xsum
64sh libi77 > /dev/null && rm libi77
65rm -f libI77/xsum0.out libI77/libI77.xsum
66rm -f src/xsum0.out
67touch src/xsum.out
68cmp f2c.h src/f2c.h && rm -fv src/f2c.h
69cmp src/readme src/README && rm -fv src/readme
70
71echo Deleting f2c.tar...
72rm tmp/f2c.tar
73rmdir tmp
74
75cd ..
76
77echo Latest f2c now in $dir.
This page took 0.208921 seconds and 5 git commands to generate.