3 # fix an old-syntax amd map to new one
5 # takes any number of files on the command line, and produces
6 # a fixed map on stdout.
8 # Package: am-utils-6.x
9 # Author: Erez Zadok <ezk@cs.columbia.edu>
12 ##############################################################################
13 ### MAINTAINER EDITABLE SECTION
15 # Mappings of old names to new ones:
16 # Update when needed, do not forget commas but not on the last entry!
17 # For your convenience, this is the complete list of all OSs that were
18 # supported by amd-upl102, in their old names:
20 # 386bsd acis43 aix3 aoi aux bsd43 bsd44 bsdi11
21 # concentrix dgux fpx4 freebsd hcx hlh42 hpux irix3 irix4 irix5 isc3
22 # linux mach2 mach3 netbsd news4 next osf1 pyrOSx riscix riscos
23 # rtu6 sos3 sos4 sos5 stellix svr4 u2_2 u3_0 u4_0 u4_2 u4_3 u4_4
24 # umax43 utek utx32 xinu43
32 ##############################################################################
33 ### DO NOT EDIT ANYTHING BELOW
35 # This is a trivial parser and works as follows:
37 # (2) search of regexps that start with '=', continue with a word to replace
38 # and end with a non-value name (whitespace, ';', or newline
41 if ($_ =~ /^$/ || $_ =~ /^#/) {
45 # modify the line if needed
46 foreach $m (keys %mappings) {
48 $_ =~ s/=$m([^a-zA-Z0-9_])/=$val$1/g;
50 # print the (possibly) modified line