Giter Club home page Giter Club logo

auto's Introduction

About auto

I am a Mac OS X program that watches for changes to a directory tree. Whenever I see a change, I run a program. For example, I can run make whenever you change your source code.

I am a Python script. I use the Mac OS X FSEvents library to detect filesystem changes.

Usage

auto path childProgram [childArg1 childArg2 ...]

First, I run childProgram, passing in the childArgN arguments given. Then I watch for any change to the directory tree rooted at path. Whenever I see a change, I run childProgram with its arguments again.

I wait 100 milliseconds after seeing a change before running the program. Additional changes in that period won't make me run the program extra times.

For example, I can run make whenever the current directory tree changes:

auto . make

Note that if make makes any changes to the current directory tree, I will immediately run it again. If make is fast and idempotent, this shouldn't cause any trouble. However, it's usually better to put your source code in a separate subdirectory from your build products.

For example, if you keep your source code in subdirectory src, I can run make install whenever the src tree changes:

auto src make install

I don't use the shell automatically, so if you need it, you have to ask for it:

auto src sh -c 'cd build && make -f ../Makefile install'

auto's People

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.