Reputation: 131
I'm building a virtual box with Veewee and I want to have a script that calls another helper script on the newly created box.
The only way I know is to provide the main script and the helper script in the postinstall-files
section of the definition.rb
, like this:
:postinstall_files => [ "main.sh","helper.sh"]
My problem is that Veewee is trying to execute all the scripts, including the helper script (which I don't want).
So I'm interested if there is another way of transffering my helper.sh
script on the VM, in order to be called from the main.sh
script.
Upvotes: 2
Views: 183
Reputation: 91
You can use veewee build hooks like this:
Veewee::Definition.declare({
:hooks => {
:before_postinstall => Proc.new { definition.box.scp('/tmp/helper.sh', '/home/veewee/helper.sh') }
}
})
Upvotes: 1