summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authormh <mh@immerda.ch>2012-12-29 17:42:38 +0100
committermh <mh@immerda.ch>2012-12-29 17:42:38 +0100
commitadf8ab5c90fbb5579d231b81a20fe87b33c36f0a (patch)
tree12dff928bc11f3501585274cfe131f7c9d041b0b /bin
parent8aff193682579cdf9504a17e3d65ae91316833a6 (diff)
improve README, get rid off obsolete --pwd-from-stdin
Diffstat (limited to 'bin')
-rwxr-xr-xbin/trocla11
1 files changed, 2 insertions, 9 deletions
diff --git a/bin/trocla b/bin/trocla
index ccceb51..ac7389f 100755
--- a/bin/trocla
+++ b/bin/trocla
@@ -31,16 +31,11 @@ OptionParser.new do |opts|
options['length'] = v.to_i
end
- opts.on("--password PASSWORD", "-p", "Provide password at command line") do |pass|
+ opts.on("--password [PASSWORD]", "-p", "Provide password at command line") do |pass|
options[:ask_password] = false
options[:password] = pass
end
- opts.on("--pwd-from-stdin") do
- options[:ask_password] = false
- end
-
-
end.parse!
def create(options)
@@ -70,9 +65,7 @@ def set(options)
exit 1
end
else
- # FIXME: I don't know if we have to delete other options here.
- password = options.delete(:password)
- password = STDIN.read if not password
+ password = options.delete(:password) || STDIN.read.chomp
end
Trocla.new(options.delete(:config_file)).set_password(
options.delete(:trocla_key),