aboutsummaryrefslogtreecommitdiff
path: root/website
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xwebsite7
1 files changed, 5 insertions, 2 deletions
diff --git a/website b/website
index d85d72a..f6e060e 100755
--- a/website
+++ b/website
@@ -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 {