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

Set PATH statement #7

@coatless

Description

@coatless

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions