GithubHelp home page GithubHelp logo

onchange's Introduction

onchange

onchange is a simple shell script (written in bash) which enables users to listen on changes on the current directory and eventually execute commands as soon as such events are received.

Dependencies

The script works both on Linux and FreeBSD systems (I don't have a Mac to test on it) but has a couple of dependencies:

  • inotifywait on Linux
  • wait_on on FreeBSD

Check whether the right dependency is already installed on your system before launching the script.

Install

Once you have onchange script downloaded and placed somewhere handy, you can call it directly:

bash /path/of/onchange/onchange.sh ...

or even better, you can create an alias for it:

alias oc="bash ~/workspace/onchange/onchange.sh"

Examples

If you are writing a Latex document, and you want to automatically create the dvi/pdf output each time you save the source document, you can just run:

cd /path/of/your/precious/article
oc gmake

If you want to launch the testsuite of your project each time you edit a file in order to check if the lastest modifications broke something:

cd /path/of/your/project
oc command-to-launch-the-testsuite

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.