From 25ddf52ad745112bbb0e58d6ebfde08361ca7513 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 3 Jul 2018 22:47:58 -0400 Subject: [PATCH] lxapigen.pl doesn't need the native dir specified on the command line now. --- lxapigen.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lxapigen.pl b/lxapigen.pl index 234b5ad..2ef9558 100755 --- a/lxapigen.pl +++ b/lxapigen.pl @@ -2,6 +2,7 @@ use warnings; use strict; +use File::Basename; my %typesizes = ( 'LONG' => 4, @@ -19,7 +20,8 @@ sub typesize { return $typesizes{$t}; } -my $dirname = defined $ARGV[0] ? $ARGV[0] : 'native'; +chdir(dirname(__FILE__)) or die("failed to chdir to script location: $!\n"); +my $dirname = 'native'; opendir(DIRH, $dirname) or die("Failed to opendir '$dirname': $!\n"); while (readdir(DIRH)) {