Skip to content

Instantly share code, notes, and snippets.

View robgrant's full-sized avatar

Rob Grant robgrant

View GitHub Profile

Keybase proof

I hereby claim:

  • I am robgrant on github.
  • I am robcgrant (https://keybase.io/robcgrant) on keybase.
  • I have a public key ASAB1xYRcjXOOSeUx8xvoxqm_teSz0mM7nf65SELeoQuKAo

To claim this, I am signing this object:

@robgrant
robgrant / autobuild.py
Created May 4, 2011 20:10
Execute a command on file modification with fsevents
from fsevents import Observer, Stream
from os.path import basename
from signal import pause
from subprocess import call
from sys import exit
def build(event):
if basename(event.name) in ['htmlviewer.js']:
call(['./build.sh'])