process SCS_PAGES_DIR etc. env vars equivalently to --pages_dir config option
[scpubgit/SCS.git] / lib / SCSite.pm
index e1fa5cb..a6b1abf 100755 (executable)
@@ -158,7 +158,7 @@ sub run_if_script {
   my $class = shift;
   my @config_keys = keys %{{$class->default_config}};
   require Getopt::Long;
-  my %config;
+  my %config = map +($_ => $ENV{"SCS_${\uc $_}"}), @config_keys;
   Getopt::Long::GetOptions(
     map +("$_=s" => \$config{$_}), @config_keys
   );