• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

KVM host image creator.Jessica Lockwood


Commit MetaInfo

Revisión06fa658f1656a5845e5afdcfd09a5960495c56db (tree)
Tiempo2019-12-09 18:15:40
AutorTatsuki SUGIURA <sugi@osdn...>
CommiterTatsuki SUGIURA

Log Message

Add limit option.

Cambiar Resumen

Diferencia incremental

--- a/create-image
+++ b/create-image
@@ -201,6 +201,13 @@ class ImageCreator
201201 end
202202
203203 if $0 == __FILE__
204+ require 'optparse'
205+
206+ opts = ARGV.getopts('l:', 'limit:', 'skip:')
207+ limit_pat = opts['limit'] || opts['l']
208+ limit_pat and
209+ limit_pat = Regexp.new(limit_pat)
210+
204211 list = YAML.load_file(ARGV[0] || 'image-list.yml')
205212 list.each do |imgdef|
206213 name = nil
@@ -214,6 +221,9 @@ if $0 == __FILE__
214221 else
215222 name = imgdef
216223 end
224+ if limit_pat
225+ limit_pat.match?(name) or next
226+ end
217227 dirs.empty? and dirs << SyncDirDef.new
218228 ImageCreator.new(name, dirs).run
219229 end