/[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.4 by joko, Sat Feb 22 17:19:36 2003 UTC revision 1.5 by joko, Sat Feb 22 17:26:13 2003 UTC
# Line 2  Line 2 
2  ##  $Id$  ##  $Id$
3  ## ---------------------------------------------------------------------------  ## ---------------------------------------------------------------------------
4  ##  $Log$  ##  $Log$
5    ##  Revision 1.5  2003/02/22 17:26:13  joko
6    ##  + enhanced unix compatibility fix
7    ##
8  ##  Revision 1.4  2003/02/22 17:19:36  joko  ##  Revision 1.4  2003/02/22 17:19:36  joko
9  ##  + unix compatibility fix  ##  + unix compatibility fix
10  ##  ##
# Line 63  sub run_cmd { Line 66  sub run_cmd {
66    print "  ", $caption, "\n" if $caption;    print "  ", $caption, "\n" if $caption;
67    print $sep, "\n";    print $sep, "\n";
68        
69    # fix for unix: prefix command with './' if no pathname (relative or absolute) included    # strip name of executable from full command string
70      $cmd =~ m/(.+?)\s/;
71      my $executable = $1;
72      
73      # for unix: check if executable is in local directory, if so - prefix with './'
74    if (!RUNNING_IN_HELL()) {    if (!RUNNING_IN_HELL()) {
75      if ($cmd !~ m/\//) {      #if ($cmd !~ m/\//) {
76        if (-e $executable) {
77        $cmd = "./$cmd";        $cmd = "./$cmd";
78      }      }
79    }    }

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

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