Johnykutty
Johnykutty

Reputation: 12829

How to install OCLint in mac os x

I'm trying to install OCLint in my mac with MAC OS X mavericks Its documentation here says that

*Following code snippet is an example for the .bashrc or .bash_profile file that is sourced when terminal launches.*

OCLINT_HOME=/path/to/oclint-release
export PATH=$OCLINT_HOME/bin:$PATH

How can I accomplish this? whether I need to create .bashrc or .bash_profile file, or add to existing file. Where can I locate .bashrc or .bash_profile file

Upvotes: 3

Views: 5216

Answers (4)

Tony TRAN
Tony TRAN

Reputation: 2178

Install Oclint with Homebrew is quickly and helpful solution. Open terminal and install homebrew first:

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

Install Oclint 0.11.1 with this command

brew install https://gist.github.com/TonyAnhTran/e1522b93853c5a456b74/raw/2f440240fe99634771a3f2353c0c53a43c2d0fb2/oclint.rb

To create .bash_profile in terminal:

Type "cd ~/" to go to your home folder
Type "touch .bash_profile" to create your new file.
Edit .bash_profile with your favorite editor (or you can just type "open -e .bash_profile" to open it in TextEdit.
Type ". .bash_profile" to reload .bash_profile and update any functions you add.

Update on 31-Jul-2017:

before_install:

  • brew cask uninstall oclint
  • brew tap oclint/formulae
  • brew install oclint

Upvotes: 11

Anton Zherdev
Anton Zherdev

Reputation: 724

brew tap oclint/formulae
brew install oclint

More details are here: https://github.com/oclint/homebrew-formulae

Upvotes: 9

acj
acj

Reputation: 4821

Those files should be in your home directory, but they will be hidden by default due to the leading dot. You can enable the "Show all files" feature to see them in Finder. Or, if you're comfortable using the Terminal app, edit the files from the terminal and append the lines for OCLint.

Upvotes: 2

Paul R
Paul R

Reputation: 212979

If you have a .bashrc in your home directory (i.e. /Users/yourname/.bashrc) already then just append these lines, otherwise create a new .bashrc containing these two lines. Then do this:

$ source ~/.bashrc

Upvotes: 4

Related Questions