Monday, January 15, 2018

automatically building when saving on mac

Playing with Batari BASIC, I thought it would be great to be able to run the build shell command every time I saved.

"fswatch" had lots of Google juice, but I couldn't get the xargs part to work.

filewatcher seemed a lot more straightforward.

I suppose I already had Ruby and RubyGems on my system (one of the weird things about having an old laptop, especially one that used to be a work machine, is that you lose track of what comes preinstalled and what was there from some previous task)

I had to
sudo gem install filewatcher
and then my command (run in the work folder) was something like

filewatcher '*bas' '2600basic.sh $FILENAME'

Easy-peasy!

No comments:

Post a Comment