Skip to content
This repository has been archived by the owner on Feb 24, 2023. It is now read-only.

Set PATH statement #7

Open
3 tasks
coatless opened this issue May 23, 2018 · 0 comments
Open
3 tasks

Set PATH statement #7

coatless opened this issue May 23, 2018 · 0 comments

Comments

@coatless
Copy link
Collaborator

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
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant