Changeset 1368

Show
Ignore:
Timestamp:
08/18/06 00:52:42
Author:
miyagawa
Message:

plugin-start: now you can use this to write a test for existing plugins

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/plagger/tools/plugin-start.pl

    r1334 r1368  
    2121$config->{author} ||= do { 
    2222    $save++; 
    23     prompt("Your name: ", '-tty'); 
     23    prompt("Your name: ", -tty); 
    2424}; 
    2525 
     
    4646sub write_file { 
    4747    my($path, $template, $vars) = @_; 
     48 
     49    if (-e $path) { 
     50        my $ans = prompt("$path exists. Override? [yN] ", -tty, -yes_no, -default => 'n'); 
     51        return if $ans !~ /[Yy]/; 
     52    } 
    4853 
    4954    my $dir = File::Basename::dirname($path);