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 71742280006ea0099aa6b83734bba153a15e7ac8..55dbd0941304f8a9f64b8069057df87596288059 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',