bin/vmc in vmc-0.4.0.beta.9 vs bin/vmc in vmc-0.4.0.beta.10
- old
+ new
@@ -1,14 +1,15 @@
#!/usr/bin/env ruby
-# vim: ft=ruby
-require "rubygems"
-require "thor"
+vmc = File.expand_path("../../vmc", __FILE__)
+vmc_ng = File.expand_path("../../vmc-ng", __FILE__)
-require "vmc"
-require "vmc/plugin"
+bin =
+ if File.exists?(File.expand_path("~/.vmc/use-ng"))
+ $LOAD_PATH.unshift "#{vmc_ng}/lib"
+ "#{vmc_ng}/bin/vmc"
+ else
+ "#{vmc}/bin/vmc"
+ end
-VMC::Plugin.load_all
-
-$exit_status = 0
-VMC::CLI.start(ARGV)
-exit($exit_status)
+$0 = bin
+load bin