#!/bin/env sh

# eve helper
function eve() {
   local eveVMPath="${HOME}/vagrant"
   if [ "${*}" = "ssh" ]; then
       local status=$(cd $eveVMPath && vagrant status)
       if [[ ! "$status" == *"The VM is running."* ]]; then
           ( cd $eveVMPath && vagrant up )
       fi
   fi
   ( cd $eveVMPath && vagrant $* )
}
