r-macos-rtools icon indicating copy to clipboard operation
r-macos-rtools copied to clipboard

Set PATH statement

Open coatless opened this issue 6 years ago • 0 comments

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

coatless avatar May 23 '18 05:05 coatless