Revision: | 1.1 |
Committed: | Tue Feb 13 22:18:25 2007 UTC (17 years, 7 months ago) by root |
Branch: | MAIN |
CVS Tags: | post_fixaltar, post_fixaltar2, rel-2_82, rel-2_81, rel-2_80, pre_coinconvert, rel-3_0, rel-2_6, rel-2_7, rel-2_4, rel-2_5, rel-2_2, rel-2_0, rel-2_1, rel-2_72, rel-2_73, rel-2_71, rel-2_76, rel-2_77, rel-2_74, rel-2_75, rel-2_54, rel-2_55, rel-2_56, rel-2_79, rel-2_53, rel-2_32, pre_fixconverter, post_coinconvert, pre_fixaltar2, rel-2_90, rel-2_92, rel-2_93, rel-2_78, post_fixconverter, pre_fixaltar, rel-2_61, rel-2_43, rel-2_42, rel-2_41, HEAD |
Log Message: | renamed maps diretcly on cvs server, add rename-maps script. template maps have not been renamed because they use windows file endings |
# | Content |
---|---|
1 | #!/opt/bin/perl |
2 | |
3 | # output mv commands to rename all map files in . to *.map |
4 | # quite hackish |
5 | |
6 | open my $find, "find . -type f -print0 |" |
7 | or die; |
8 | |
9 | $/ = "\x00"; |
10 | |
11 | while (<$find>) { |
12 | next if /\/CVS\//; |
13 | chomp; |
14 | next if /\.map$/; |
15 | next if /\.map,v$/; |
16 | open my $map, "<:raw", $_ |
17 | or die "$_: $!"; |
18 | sysread $map, my $buf, 4096; |
19 | if (s/,v$//) { |
20 | next unless $buf =~ /^text\n\@arch map$/m; |
21 | print "mv -v \Q$_\E,v \Q$_\E.map,v\n"; |
22 | } else { |
23 | next unless $buf =~ /^arch map$/m; |
24 | print "mv -v \Q$_\E \Q$_\E.map\n"; |
25 | } |
26 | } |