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)
commitdf6b210928a89320953a1bdf83ea21c99a664975
tree62e8b2c8ae5e0d18543264741d5036b3ef476fe3
parente7740474e47e5ea2ec6deb4739f4d56c1b5ff5a3
parent1a8dab7825fd2a607a2396a914fbb60604b15345
Merge: expanded the nit_env.sh script to register nit within .bash_profile and .bashrc

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>