/[cvs]/nfo/perl/libs/shortcuts.pm
ViewVC logotype

Diff of /nfo/perl/libs/shortcuts.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by joko, Fri Feb 14 14:17:04 2003 UTC revision 1.4 by joko, Sat Feb 22 17:19:36 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ---------------------------------------------------------------------------  ## ---------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.4  2003/02/22 17:19:36  joko
6    ##  + unix compatibility fix
7    ##
8  ##  Revision 1.3  2003/02/14 14:17:04  joko  ##  Revision 1.3  2003/02/14 14:17:04  joko
9  ##  - shortened seperator  ##  - shortened seperator
10  ##  ##
# Line 59  sub run_cmd { Line 62  sub run_cmd {
62    print "  ", $cmd, "\n";    print "  ", $cmd, "\n";
63    print "  ", $caption, "\n" if $caption;    print "  ", $caption, "\n" if $caption;
64    print $sep, "\n";    print $sep, "\n";
65      
66      # fix for unix: prefix command with './' if no pathname (relative or absolute) included
67      if (!RUNNING_IN_HELL()) {
68        if ($cmd !~ m/\//) {
69          $cmd = "./$cmd";
70        }
71      }
72      
73    system($cmd);    system($cmd);
74    #`$cmd`;    #`$cmd`;
75    print "ready.", "\n";    print "ready.", "\n";
# Line 81  sub bool2status { Line 92  sub bool2status {
92    return ($bool ? 'ok' : 'failed');    return ($bool ? 'ok' : 'failed');
93  }  }
94    
95    sub RUNNING_IN_HELL () { $^O eq 'MSWin32' }
96    
97    
98  1;  1;

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed