From 6527706d5170b991b0f66fcc9b83001232ffd3dd Mon Sep 17 00:00:00 2001 From: martin_r Date: Fri, 2 Apr 2010 13:10:09 +0000 Subject: [PATCH] gconf2 in fehlermeldung verpackt und programm ohne parameter aufrufbar gemacht --- linux/traycommand/traycommand | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/linux/traycommand/traycommand b/linux/traycommand/traycommand index 6a4e9fef..7bd862ae 100755 --- a/linux/traycommand/traycommand +++ b/linux/traycommand/traycommand @@ -9,11 +9,19 @@ rescue LoadError raise end +begin + require 'gconf2' +rescue LoadError + $stderr << "########################################################\n" + $stderr << "# In order to run this programm you need ruby-gconf2! #\n" + $stderr << "########################################################\n" + raise +end + require 'yaml' require 'pp' require 'optparse' require 'ostruct' -require 'gconf2' TRAYCOMMANDVERSION = [0,1] @@ -39,6 +47,7 @@ optpars = OptionParser.new { |opts| begin optpars.parse! + $options.configfile ||= "layoutswitch.yaml" rescue => e puts e puts optpars