From d31a44f04135410ec5bbfec0b503f0bc38e51ce4 Mon Sep 17 00:00:00 2001 From: Stephen Gran Date: Wed, 14 Aug 2013 17:11:24 +0100 Subject: [PATCH] add reencrypt helper Signed-off-by: Stephen Gran Signed-off-by: Peter Palfrader --- pws | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/pws b/pws index 38aaafc..83ab6bb 100755 --- a/pws +++ b/pws @@ -736,6 +736,19 @@ class Ed end end +class Reencrypt < Ed + def help(parser, code=0, io=STDOUT) + io.puts "Usage: #{$program_name} ed " + io.puts parser.summarize + io.puts "Reencrypts the file (useful for changed user lists or keys)" + exit(code) + end + def initialize() + $editor = '/bin/true' + super + end +end + class Get def help(parser, code=0, io=STDOUT) io.puts "Usage: #{$program_name} get " @@ -942,6 +955,7 @@ end def help(code=0, io=STDOUT) io.puts "Usage: #{$program_name} ed" + io.puts "Usage: #{$program_name} rc" io.puts " #{$program_name} ls" io.puts " #{$program_name} gitdiff" io.puts " #{$program_name} update-keyring" @@ -955,6 +969,7 @@ def parse_command case ARGV.shift when 'ls' then Ls.new when 'ed' then Ed.new + when 'rc' then Reencrypt.new when 'gitdiff' then GitDiff.new when 'get' then Get.new when 'update-keyring' then KeyringUpdater.new -- 2.39.5