xref: /openbsd/gnu/usr.bin/gcc/contrib/convert_to_f2c (revision 898184e3)
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
18set -e
19
20if [ x$1 = x ]
21then
22  dir=g2c-`date +%Y%m%d`
23else
24  dir=$1
25fi
26
27newdir=`echo $dir | sed -e "s:g:f:"`
28
29cd $dir
30
31set +e
32
33mv -i changes.netlib changes
34mv -i disclaimer.netlib disclaimer
35mv -i g2c.hin f2c.h
36mv -i permission.netlib permission
37mv -i readme.netlib readme
38cd libF77
39mv -i README.netlib README
40mv -i makefile.netlib makefile
41cd ../libI77
42mv -i README.netlib README
43mv -i makefile.netlib makefile
44cd ..
45
46cd ..
47
48mv -iv $dir $newdir
49