diff --git a/.gitignore b/.gitignore index 1c063f7174..4c9102f1b3 100644 --- a/.gitignore +++ b/.gitignore @@ -27,3 +27,4 @@ npm-debug.log var/* .vscode/ tools/conf.ini +tools/custom_provision diff --git a/Vagrantfile b/Vagrantfile index 2c8bfe6e96..21732e5cf0 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -101,6 +101,10 @@ if [ -d "/sys/fs/selinux" ]; then fi ln -nsf /srv/zulip ~/zulip /srv/zulip/tools/provision +if [ -f /srv/zulip/tools/custom_provision ]; then + chmod +x /srv/zulip/tools/custom_provision + /srv/zulip/tools/custom_provision +fi SCRIPT config.vm.provision "shell", diff --git a/docs/dev-env-first-time-contributors.md b/docs/dev-env-first-time-contributors.md index faa95563f0..9c7187e639 100644 --- a/docs/dev-env-first-time-contributors.md +++ b/docs/dev-env-first-time-contributors.md @@ -462,6 +462,14 @@ much faster than the original `vagrant up` since the base image is already cached on your machine (it takes about 5 minutes to run with a fast Internet connection). +Any additional programs (e.g. Zsh, emacs, etc.) or configuration that +you may have installed in the development environment will be lost +when you recreate it. To address this, you can create a script called +`tools/custom_provision` in your Zulip Git checkout; and place any +extra setup commands there. Vagrant will run `tools/custom_provision` +every time you run `vagrant provision` (or create a Vagrant guest via +`vagrant up`). + #### Shutting down the development environment for use later To shut down but preserve the development environment so you can use