Changeset 8870 in genesis


Ignore:
Timestamp:
Mar 2, 2011, 6:43:53 PM (14 years ago)
Author:
rick
Message:

Hack to avoid using arguments to get all the configs generated.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/genesis-to-yaml.pl

    r8644 r8870  
    2121$argc = $#ARGV + 1;
    2222if ($argc == 0) {
    23   print STDERR  "Usage $_ <wleiden.conf> ...\n";
    24   exit 1;
    25 # Hack to easy support multiple files without remembering any variable in between
    26 } elsif ($argc > 1) {
     23  print STDERR  "Usage $ENV{_} <wleiden.conf> ...\n";
     24  @ARGV=`ls \$(dirname $ENV{_})/../nodes/*/wleiden.conf`;
     25}
     26
     27if ($argc != 1) {
     28  # Hack to easy support multiple files without remembering any variable in between
    2729  foreach $file (@ARGV) {
     30     chomp($file);
    2831     $output = $file;
    2932     $output =~ s/conf$/yaml/;
    30      print "# Processing $file\n";
     33     print "# Processing $file -> $output\n";
    3134     $CMD=dirname(__FILE__) . "/genesis-to-yaml.pl";
    3235     `$CMD $file > $output`;
Note: See TracChangeset for help on using the changeset viewer.