Why is a newly installed app visible only on a new shell ?

I am trying to automatize the installation of our BSD machines with one single script. However, I run into a problem : after the script has installed all ports, including subversion, I need to checkout our projects by running "svn checkout". However, the script will fail miserably because I need to manually stop the script, exit and open a new shell before being able to run my newly installed subversion application.

Is there a way around this (like sourcing a .tchshrc file) so that the installation can be done in one go ?

Thanks.
 
Some shells don't actually scan the PATH for executables when you type them in to run them. Instead, they keep a local cache of known executables in the PATH (a hash DB of them). When you install new software, shell doesn't know about it, until you tell it to refresh the hash DB.

For tcsh/csh the command to do so is called rehash.

For sh-based shells, the command to do so is hash -r.
 
Back
Top