Skip to content

Instantly share code, notes, and snippets.

@somahargitai
Last active September 22, 2021 17:32
Show Gist options
  • Save somahargitai/cd2843de67ce676309d9a9cf976de61e to your computer and use it in GitHub Desktop.
Save somahargitai/cd2843de67ce676309d9a9cf976de61e to your computer and use it in GitHub Desktop.
Make Go executable work on Mac

Make Go executable work on Mac

What we do

  • add necessary folder to Path
  • get the repo
  • create executable file with Make
  • copy executable to /usr/local/bin to let us it everwhere
  • modify access with chmod
  • run it

Prerequisites

Go and Make should be installed

Setup

  • open Path with VS Code, Nano or your preferred text editor: code /etc/paths or nano /etc/paths

It should look like:

/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
/usr/local/sbin
  • commands
git clone git@github.com:kevinschoon/pomo.git
cd pomo
make
// cd $GOPATH
cd ~/go/bin
sudo cp pomo /usr/local/bin/pomo
sudo chmod a+rx pomo
cd ~
pomo init
pomo start -t my-project "write some codes"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment