Rice-Comp413-2016 / RDFS

The Rice Comp413 class (2016-2017) implementation of HDFS. (This will eventually be put under an open source license, which one TBD).
4 stars 2 forks source link

Detect changes to vagrant_provision.sh on login. #27

Closed pelmers closed 8 years ago

pelmers commented 8 years ago

This PR adds a script which runs on login (executed from .bashrc) and does the following:

  1. Does .vagrant_provision.backup exist?
    • If yes, check whether all lines in vagrant_provision.sh exist in the backup files.
    • Copy all detected added/changed lines to provision_diff.sh and prompt you to run provision_diff.sh.
  2. Then create new backup file from current provision.

Because chickens and eggs, upon merge this will not run automatically, you will have to make one (last?) manual adjustment by executing: echo 'python /home/vagrant/rdfs/utility/provision_diff.py' >> /home/vagrant/.bashrc

Then when you login via vagrant ssh, if provision has changed since last ssh, the difference will be printed along with the instruction to execute if it looks correct.