diff options
author | martin_r <martin_r@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2010-04-02 13:10:09 +0000 |
---|---|---|
committer | martin_r <martin_r@b9310e46-f624-0410-8ea1-cfbb3a30dc96> | 2010-04-02 13:10:09 +0000 |
commit | 782d640d0821ce5608632503347e60520a8d0f4b (patch) | |
tree | 1c2b179da7f07908e87257d3ee215b609c2bfcfe | |
parent | 99b07611b80e421bffca1b60fc17462d9f2a9594 (diff) |
gconf2 in fehlermeldung verpackt und programm ohne parameter aufrufbar gemacht
git-svn-id: https://svn.neo-layout.org@2275 b9310e46-f624-0410-8ea1-cfbb3a30dc96
-rwxr-xr-x | linux/traycommand/traycommand | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/linux/traycommand/traycommand b/linux/traycommand/traycommand index 6a4e9fe..7bd862a 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 |