diff options
Diffstat (limited to '')
-rwxr-xr-x | website | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -37,6 +37,7 @@ use strict; use warnings; use Getopt::Long qw(:config no_ignore_case bundling pass_through); use Pod::Usage qw(pod2usage); +use File::Basename qw(dirname); my $help = 0; my $title = ''; @@ -52,6 +53,8 @@ sub test { sub escaped_cmd { my ($cmd, @args) = @_; + my $dirname = dirname(__FILE__); + $cmd = "$dirname/$cmd"; $cmd = $cmd." \"$_\"", for @args; system($cmd); exit $? >> 8; @@ -73,10 +76,10 @@ sub dispatch { ); } elsif ($action eq 'pastebin') { my @sub_args = grep { $_ ne $action } @args; - escaped_cmd("./pastebin/website-pastebin", @sub_args); + escaped_cmd("pastebin/website-pastebin", @sub_args); } elsif ($action eq 'slides') { my @sub_args = grep { $_ ne $action } @args; - escaped_cmd("./slides/website-slides", @sub_args); + escaped_cmd("slides/website-slides", @sub_args); } elsif ($action eq 'test') { test(); } else { |