OSDN Git Service

Disk size shorthund support.
[osdn-codes/image-creator.git] / create-image
index f110622..b6fc7f6 100755 (executable)
@@ -199,6 +199,7 @@ if $0 == __FILE__
     if imgdef.kind_of?(Hash)
       name = imgdef['name']
       (imgdef['dirs'] || {}).each do |path, opts|
+        opts.kind_of?(Hash) or opts = {size: opts}
         dirs << SyncDirDef.new({path: path}.merge(opts.keys.map(&:to_sym).zip(opts.values).to_h))
       end
     else