Skip to content

Instantly share code, notes, and snippets.

@mtheoryx
Created March 26, 2014 13:44
Show Gist options
  • Select an option

  • Save mtheoryx/9783456 to your computer and use it in GitHub Desktop.

Select an option

Save mtheoryx/9783456 to your computer and use it in GitHub Desktop.
#!/usr/bin/ruby
def startup_oracle_vm
puts "Executing startup..."
system('cd $ORACLE_HOME && vagrant up')
exit!
end
startup_oracle_vm \
unless
%x(cd $ORACLE_HOME \
&& vagrant status | \
grep default | \
awk '{split($0,a," "); print a[2]}' \
| xargs echo -n\
) == \
"running"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment