about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2018-06-19 03:57:13 +0000
committerEric Wong <e@80x24.org>2018-06-19 23:59:18 +0000
commit58c56c24325584c5c58feba5d1502c054a89f0a1 (patch)
tree2f184ab53d1507aa8147e327063db7c619928711
parentf71254eb7996130188d7a05f994b252919ec6d4a (diff)
downloadmogilefs-client-58c56c24325584c5c58feba5d1502c054a89f0a1.tar.gz
This is to change classes of existing files (not change classes
themselves as in "mogadm class update"
-rwxr-xr-xbin/mog5
1 files changed, 5 insertions, 0 deletions
diff --git a/bin/mog b/bin/mog
index 89b1b9b..6238289 100755
--- a/bin/mog
+++ b/bin/mog
@@ -160,6 +160,11 @@ begin
         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