Merge: expanded the nit_env.sh script to register nit within .bash_profile and .bashrc
authorJean Privat <jean@pryen.org>
Mon, 28 Dec 2015 21:21:57 +0000 (16:21 -0500)
committerJean Privat <jean@pryen.org>
Mon, 28 Dec 2015 21:21:57 +0000 (16:21 -0500)
When running `source misc/nit_env.sh install` I noticed that it resulted in the following error:

`grep: User/user .profile: No such file or directory`

The `nit_env.sh` script created a `.profile` file in the home directory despite an existing `.bash_profile`. The `nit` command won't work since the shell will read the `.bash_profile` instead of the `profile`.

This PR checks for the existance and writes to a `.profile` or `.bashrc` or `.bash_profile`, if it finds none of those it creates a `.profile` and writes to that one.

If the PR is accepted the documentation will have to be updated.

Pull-Request: #1913
Reviewed-by: Jean Privat <jean@pryen.org>


Trivial merge