From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.1 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id 993A11F597; Tue, 19 Jun 2018 03:57:16 +0000 (UTC) From: Eric Wong To: mogilefs-client-public@bogomips.org Cc: Eric Wong Subject: [PATCH 1/3] mog: add updateclass command Date: Tue, 19 Jun 2018 03:57:13 +0000 Message-Id: <20180619035715.13614-2-e@80x24.org> In-Reply-To: <20180619035715.13614-1-e@80x24.org> References: <20180619035715.13614-1-e@80x24.org> List-Id: This is to change classes of existing files (not change classes themselves as in "mogadm class update" --- bin/mog | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/bin/mog b/bin/mog index 89b1b9b..6238289 100755 --- a/bin/mog +++ b/bin/mog @@ -160,6 +160,11 @@ def human_size(size) mg.get_file_data(key, $stdout) end end + when 'updateclass' + newclass = cfg[:class] or abort '-C/--class not specified' + ARGV.each do |key| + mg.updateclass(key, newclass) + end when 'ls' prefixes = ARGV.empty? ? [ nil ] : ARGV if ls_l -- EW