testbot/scripts: Tweak CheckWineTestBot.pl to autodetect WineTestBot's lib directory.

Francois Gouget fgouget at codeweavers.com
Thu Oct 4 07:38:08 CDT 2012


This assumes it is run from WineTestBot's tree rather than being copied elsewhere but removes one location to modify if installing WineTestBot in a non-default location.
---
 testbot/scripts/CheckWineTestBot.pl |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/testbot/scripts/CheckWineTestBot.pl b/testbot/scripts/CheckWineTestBot.pl
index 529fd94..2793a17 100755
--- a/testbot/scripts/CheckWineTestBot.pl
+++ b/testbot/scripts/CheckWineTestBot.pl
@@ -19,7 +19,14 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
 
 use strict;
-use lib "/usr/lib/winetestbot/lib";
+
+my $Dir;
+sub BEGIN
+{
+  $0 =~ m=^(.*)/[^/]*$=;
+  $Dir = $1;
+}
+use lib "$Dir/../lib";
 
 use WineTestBot::Config;
 use WineTestBot::Engine::Notify;
-- 
1.7.10.4




More information about the wine-patches mailing list