Skip to content

Instantly share code, notes, and snippets.

@jefftriplett
Created July 22, 2009 18:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jefftriplett/152170 to your computer and use it in GitHub Desktop.
Save jefftriplett/152170 to your computer and use it in GitHub Desktop.
# http://github.com/garethr/localbuilder
#
# Python script for monitoring a given directory for changes and running
# a command when something changes
#
# localbuilder_run.sh
#
# file to run every time a file changes in a given path
#!/bin/bash
/usr/bin/python /Users/jefftriplett/sites/ellington/tests/file_to_run.py
#
# localbuilder.sh
#
# monitor a folder path and anytime a file changes, run a given command
# **all paths** should be absolute paths
#
/usr/bin/python localbuilder.py \
--period=1 \
--path=/Users/jefftriplett/sites/ellington/tests/ \
--command=/Users/jefftriplett/sites/ellington/localbuilder_run.sh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment