Will the second time restart all shell commands in my script?
I am developing a Vagrant wrapper script to set up an Ubuntu VM with a range of things installed. I notice that it sudo apt-get update
takes a long time to start up during initialization, and therefore checking that my Vagrant settings are configuring the VM correctly is very slow.
If I run it a vagrant provision
second time, will it rerun all shell commands in my script or will it only rerun the newly added settings? I really want to shorten the development time for this script!
source to share
Use bypass logic in your Script provision
When rerunning a given firewall provisioning device, it should rerun the entire script. Any bypasses or short circuits you might want to apply should be constructed in your script conditionals. As one example:
# Only install something if a certain file is missing.
if [ ! -f /some/file ]; then
: # run your installer
fi
source to share