OSDN Git Service

PR bootstrap/11932
[pf3gnuchains/gcc-fork.git] / contrib / convert_to_f2c
1 #!/bin/sh
2 #
3 # convert_to_f2c [g2c-dir]
4 #
5 # Renames certain files in a g2c (libg2c) directory so they no longer have the
6 # `.netlib' suffix, a la netlib's f2c distribution.  If `g2c-dir' is not
7 # specified, `g2c-YYYYMMDD' is the default, where YYYYMMDD is the current
8 # date.  The directory is renamed such that the first `g' becomes an `f',
9 # usually `g2c-YYYYMMDD' -> `f2c-YYYYMMDD'.
10 #
11 # (C) 1999 Free Software Foundation
12 # Originally by James Craig Burley <craig@jcb-sc.com>, September 1999.
13 #
14 # This script is Free Software, and it can be copied, distributed and
15 # modified as defined in the GNU General Public License.  A copy of
16 # its license can be downloaded from http://www.gnu.org/copyleft/gpl.html
17
18 set -e
19
20 if [ x$1 = x ]
21 then
22   dir=g2c-`date +%Y%m%d`
23 else
24   dir=$1
25 fi
26
27 newdir=`echo $dir | sed -e "s:g:f:"`
28
29 cd $dir
30
31 set +e
32
33 mv -i changes.netlib changes
34 mv -i disclaimer.netlib disclaimer
35 mv -i g2c.hin f2c.h
36 mv -i permission.netlib permission
37 mv -i readme.netlib readme
38 cd libF77
39 mv -i README.netlib README
40 mv -i makefile.netlib makefile
41 cd ../libI77
42 mv -i README.netlib README
43 mv -i makefile.netlib makefile
44 cd ..
45
46 cd ..
47
48 mv -iv $dir $newdir