Skip to content

spenthil/waitchange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 

Repository files navigation

Introduction

waitchange is a simple script that monitors the specified files and folders for change. When something does change it exits with code 0.

Usage: waitchange [options] filename1 filename2 ...

Options:
  --version        show program's version number and exit
  -h, --help       show this help message and exit

Examples

The following examples assumes a bash shell and waitchange (symbolic link to waitchange.py) is in your path.

  • When a C++ file changes in the current directory or a subdirectory run scons (build system). Control-C to exit.

      while [ $[`waitchange *.cpp *.hpp`] ]; do scons; done
    
  • Growl notification when "afile.py" changes. Assumes you have growlnotify in your path.

      waitchange afile.py && echo 'afile.py changed!' | growlnotify
    

Installation

Assuming /usr/local/bin is in your path, the following works:

sudo curl -o /usr/local/bin/waitchange http://github.com/spenthil/waitchange/raw/master/waitchange.py && sudo chmod +x /usr/local/bin/waitchange

License

Licensed under the MIT License.

Copyright (c) 2010 Senthil Palanisami

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

About

OS X script that monitors the specified files and directories for change.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages