r-macos-rtools
r-macos-rtools copied to clipboard
Set PATH statement
clang6
installer doesn't automatically set the path for users... 😡
- Determine where to set path:
- [ ] Verify path does not already have the appropriate bin statement TBA
- [ ] Check for the kind
case $SHELL in
*/zsh)
shell_type="zsh"
;;
*/bash)
shell_type="bash"
;;
*)
exit 1 # error'd
esac
- [ ] If
zsh
exists, then write to~/.zshrc
otherwise, write to~/.bash_profile or
/etc/path.d/clang6` -
Note: Writing to
/etc/path.d/
is preserved during a system upgrade compared to/etc/path
.
In the ~/.bash_profile
or ~/.zshrc
, append to the end:
if [ -d "/usr/local/clang6/bin" ] ; then
export PATH="/usr/local/clang6/bin:$PATH"
fi