Permalink
Browse files

fixed patchmaster command line arg handling

  • Loading branch information...
1 parent 562d418 commit 72fd19a4eab0706bbf354c41f2c976f8e72d91db @jimm committed Apr 11, 2012
Showing with 2 additions and 7 deletions.
  1. +2 −7 bin/patchmaster
View
@@ -12,17 +12,12 @@
require 'optparse'
require 'patchmaster'
-use_midi = true
+pm = PM::Main.instance
OptionParser.new do |opts|
opts.banner = "usage: patchmaster [options] [pm_file]"
opts.on("-d", "--debug", "Turn on debug mode") { $DEBUG = true }
- opts.on("-n", "--no-midi", "Turn off MIDI processing") { use_midi = false }
+ opts.on("-n", "--no-midi", "Turn off MIDI processing") { pm.no_midi! }
end.parse!(ARGV)
-pm = PM::Main.instance
-if !use_midi
- pm.no_midi!
- ARGV.shift
-end
pm.load(ARGV[0]) if ARGV[0]
pm.run

0 comments on commit 72fd19a

Please sign in to comment.