diff options
author | Zapata <zapata@xs4all.nl> | 2011-01-29 22:14:19 +0100 |
---|---|---|
committer | Zapata <zapata@xs4all.nl> | 2011-01-29 22:14:19 +0100 |
commit | 5196fb316c1afc2b6b0d11132e105c7f1fb841fe (patch) | |
tree | d3a96a7be65c79276674f8c73a0f3f2ae082a234 /bin | |
parent | e65dbf59bf3aaa0b4bde29ca49ca67f7ad17b5a9 (diff) | |
download | keyringer-5196fb316c1afc2b6b0d11132e105c7f1fb841fe.tar.gz keyringer-5196fb316c1afc2b6b0d11132e105c7f1fb841fe.tar.bz2 |
preliminary support for recipient management 2
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/keyringer | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/bin/keyringer b/bin/keyringer index 74dfcb1..d6ab3d4 100755 --- a/bin/keyringer +++ b/bin/keyringer @@ -12,16 +12,18 @@ end $:.unshift File.dirname(__FILE__) + '/../lib' require 'keyringer' begin - action = Keyringer.const_get(ARGV[1].capitalize) - - if action.is_a?(Class) - instance = action.new - output = instance.execute - puts output + begin + action = Keyringer.const_get(ARGV[1].capitalize) + rescue NameError + wrapper = Keyringer::BashWrapper.new + wrapper.execute + else + if action.is_a?(Class) + instance = action.new + output = instance.execute + puts output + end end -rescue NameError - wrapper = Keyringer::BashWrapper.new - wrapper.execute rescue SystemExit => e exit e.status rescue Exception => e |