forked from jedi4ever/veewee
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated virtualbox template for ubuntu 10.10
- Loading branch information
Showing
6 changed files
with
53 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,64 @@ | ||
require 'veewee/session' | ||
|
||
#Load Veewee::Session libraries | ||
lib_dir= File.expand_path(File.join(File.dirname(__FILE__),"..","..", "lib")) | ||
Dir.glob(File.join(lib_dir, '**','*.rb')).each {|f| require f } | ||
|
||
#Setup some base variables to use | ||
veewee_dir= File.expand_path(File.join(File.dirname(__FILE__),"..","..")) | ||
definition_dir= File.expand_path(File.join(".", "definitions")) | ||
lib_dir= File.expand_path(File.join(veewee_dir, "lib")) | ||
box_dir= File.expand_path(File.join(veewee_dir, "boxes")) | ||
template_dir=File.expand_path(File.join(veewee_dir, "templates")) | ||
template_dir=File.expand_path(File.join(lib_dir,"..", "templates")) | ||
|
||
#vbox_dir=File.expand_path(File.join(veewee_dir, "tmp")) | ||
veewee_dir="." | ||
definition_dir= File.expand_path(File.join(veewee_dir, "definitions")) | ||
tmp_dir=File.expand_path(File.join(veewee_dir, "tmp")) | ||
|
||
iso_dir=File.expand_path(File.join(veewee_dir, "iso")) | ||
|
||
#needs to be moved to the config files to be allowed override | ||
#ENV['VBOX_USER_HOME']=vbox_dir | ||
|
||
#Load Veewee::Session libraries | ||
Dir.glob(File.join(lib_dir, '**','*.rb')).each {|f| | ||
require f } | ||
box_dir=File.expand_path(File.join(veewee_dir, "boxes")) | ||
|
||
#Initialize | ||
Veewee::Session.setenv({:veewee_dir => veewee_dir, :definition_dir => definition_dir, | ||
:template_dir => template_dir, :iso_dir => iso_dir, :box_dir => box_dir, :tmp_dir => tmp_dir}) | ||
|
||
class BaseBoxCommand < Vagrant::Command::GroupBase | ||
register "basebox","Commands to manage baseboxes" | ||
|
||
desc "templates", "List the currently available box templates" | ||
def templates | ||
Veewee::Session.list_templates | ||
end | ||
|
||
desc "define BOXNAME TEMPLATE", "Define a new box starting from a template" | ||
def define(boxname, template) | ||
puts "define a new box #{boxname}, starting from template #{template}" | ||
Veewee::Session.define(boxname,template) | ||
end | ||
|
||
desc "build BOXNAME", "Build the box BOXNAME" | ||
def build(boxname) | ||
puts "Building box #{boxname}" | ||
Veewee::Session.build(boxname) | ||
end | ||
|
||
desc "ostypes", "List the available Operating System types" | ||
def ostypes | ||
puts "Operating System types:" | ||
Veewee::Session.list_ostypes | ||
end | ||
|
||
desc "clean", "Clean all unfinished builds" | ||
def clean | ||
puts "Cleaning all unfinished builds" | ||
end | ||
|
||
end | ||
|
||
|
||
class SayHelloCommand < Vagrant::Command::Base | ||
register "hello", "Says hello then goodbye" | ||
|
||
def hello | ||
puts "HELLO!" | ||
end | ||
|
||
module Vagrant | ||
module Command | ||
class BoxCommand < Vagrant::Command::GroupBase | ||
# Do not register anymore, as this registration is already done in Vagrant core | ||
# Since Ruby classes are 'open', we are just adding subcommands to the 'box' command | ||
|
||
desc "templates", "List the currently available box templates" | ||
def templates | ||
Veewee::Session.list_templates | ||
end | ||
|
||
desc "init BOXNAME TEMPLATE", "Define a new box starting from a template" | ||
def init(boxname, template) | ||
puts "Init a new box #{boxname}, starting from template #{template}" | ||
Veewee::Session.define(boxname,template) | ||
end | ||
|
||
desc "build BOXNAME", "Build the box BOXNAME" | ||
def build(boxname) | ||
puts "Building box #{boxname}" | ||
Veewee::Session.build(boxname) | ||
end | ||
|
||
desc "ostypes", "List the available Operating System types" | ||
def ostypes | ||
puts "Operating System types:" | ||
Veewee::Session.list_ostypes | ||
end | ||
|
||
desc "clean", "Clean all unfinished builds" | ||
def clean | ||
puts "Cleaning all unfinished builds" | ||
end | ||
|
||
end | ||
def goodbye | ||
puts "GOODBYE!" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters