Debian Codegraph @

texmf-dist/doc/fonts/libertine/rename_enc

raw
1 #!/usr/bin/perl -w
2 # Copyright 2012 Ben Hall [email protected]
3 # School of Computing, Queen's University
4 # This program is free software, licensed under the GNU GPL, >=2.0.
5 # This software comes with absolutely NO WARRANTY.
6 #
7 # Usage: rename_enc fontdirectory fontabbreviation
8 #
9 # Grab font dir and font abbreviation from command line
10 my $dir = $ARGV[0];
11 my $font = $ARGV[1];
12 @files = <fonts/enc/dvips/$dir/*.enc>;
13 foreach $file (@files) {
14 # print $file . "\n"; #echo file name for testing.
15 # rename each file with name of the form a_xxxxxx.enc
16 # to $font_xxxxxx.enc
17 $_ = $file;
18 $prefix = $font . "_";
19 s/a_/$prefix/;
20 `mv $file $_`;
21 }