1. Diab Jerius
  2. wikiup

Commits

Diab Jerius  committed 83e560e

add segment variable to config file

  • Participants
  • Parent commits f228e09
  • Branches default

Comments (0)

Files changed (1)

File src/wikiup.pl.in

View file
  • Ignore whitespace
 
   $config->set( bin_path => $bin_path );
 
-  $config->set( user => $ARGV{user} )
-    if defined $ARGV{user};
-
   my $sleep =
               defined $ARGV{sleep}          ? $ARGV{sleep}
 	    : defined $config->get('sleep') ? $config->get('sleep') 
   $config->set( transform => $ARGV{transform} )
     if defined $ARGV{transform} && ! defined $config->get( 'transform' );
 
-  $config->set( insecure => $ARGV{insecure} )
-    if defined $ARGV{insecure};
+  # copy over ordinary variables
+  $config->set( $_ => $ARGV{$_} )
+    foreach grep { defined $ARGV{$_} } qw[ user insecure segment ];
 
   # set attributes
   $config->set_attr( $_ ) foreach split( ',', $ARGV{attrs} );
 
 See the C<--transform> option.
 
+=item C<segment>
+
+See the C<--segment> option.
+
 =item C<bin_path>
 
 The path (relative to the base URL) of the upload command.  By default