sc: rename data files to append game release abbreviation
authorMischa POSLAWSKY <perl@shiar.org>
Sat, 13 Jun 2015 02:21:13 +0000 (04:21 +0200)
committerMischa POSLAWSKY <perl@shiar.org>
Sat, 13 Jun 2015 02:21:13 +0000 (04:21 +0200)
Common prefix and allow distinction within generation version number,
such as wol (first sc2 variant) and the upcoming lotv (final version)
in addition to hots (current expansion).

sc-units-bw.inc.pl [moved from sc-units.inc.pl with 100% similarity]
sc-units-hots.inc.pl [moved from sc2-units.inc.pl with 100% similarity]
sc.plp

similarity index 100%
rename from sc-units.inc.pl
rename to sc-units-bw.inc.pl
similarity index 100%
rename from sc2-units.inc.pl
rename to sc-units-hots.inc.pl
diff --git a/sc.plp b/sc.plp
index 7174228..55dbd09 100644 (file)
--- a/sc.plp
+++ b/sc.plp
@@ -1,9 +1,10 @@
 <(common.inc.plp)><:
 
-my $datafile = 'sc-units.inc.pl';
+my $scver = 'bw';
 if ($ENV{PATH_INFO} and $ENV{PATH_INFO} eq '/2') {
-       $datafile = 'sc2-units.inc.pl';
+       my $scver = 'hots';
 }
+my $datafile = "sc-units-$scver.inc.pl";
 
 Html({
        title => 'starcraft unit cheat sheet',