diff --git a/umbrel-dev b/umbrel-dev index ccd3d69..02b135b 100755 --- a/umbrel-dev +++ b/umbrel-dev @@ -16,8 +16,8 @@ Commands: halt Halt the development VM destroy Destroy the development VM rebuild [] Rebuild all or a specific container - ssh Get an SSH session inside the development VM run Run a command inside the development VM + ssh Get an SSH session inside the development VM EOF } @@ -56,6 +56,12 @@ destroy() { vagrant destroy } +# Run a command inside the development VM +run() { + command=$1 + vagrant ssh -c "cd /vagrant/getumbrel/umbrel && $1" +} + # Show help text if no args set or help is called if [[ -z ${1+x} ]] || [[ "$1" = "help" ]]; then show_help @@ -91,3 +97,10 @@ if [[ "$1" = "destroy" ]]; then destroy exit fi + +# Run +if [[ "$1" = "run" ]]; then + shift + run "$1" + exit +fi