• Stars
    star
    264
  • Rank 155,103 (Top 4 %)
  • Language
    C
  • License
    Apache License 2.0
  • Created over 12 years ago
  • Updated over 8 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Like inotify-tools but for OS X's FSEvents

FSEvents Tools

Build Status

Floobits Status

Description

Command-line tools and scripts that use OS X's FSEvents API. Mostly useful for watching a directory and reacting to changes in it.

This post explains why I made this and includes more usage examples.

Usage examples

Alert if any files in a directory are changed.

notifywait /path/; echo "\007"

Rebuild LESS when anything in styles changes. Assuming you have a script similar to this rebuild_less.sh:

#!/bin/bash
for less_file in styles/*.less
do
  css_file=`echo $less_file | sed -E "s/.less//"`
  lessc $less_file $css_file.css
done

...just run:

notifyloop styles ./rebuild_less.sh

Automatically rsync files to a remote server if any of them are changed.

autorsync . 192.168.1.127:/var/www

The above invokes rsync with -avz (archive mode, verbose, compress). To pass additional arguments to rsync, for example:

RSYNC_OPTS='--exclude="*.pyc"' autorsync . 192.168.1.127:/var/www

To do the same thing "manually":

notifyloop . rsync -avz --exclude="*.pyc" . 192.168.1.127:/var/www

Building from source

Building master

In addition to the standard automake/autoconf/make, you'll need pkg-config. brew install pkg-config should do the trick.

Once you have all the dependencies, run ./autogen.sh and make install.

Building a release tarball

GPG-signed releases are available here.

Building release tarballs requires the same dependencies, except for automake and pkg-config. Once you've installed the dependencies, run:

./configure
make
make install

Depending on permissions, make install may require sudo.

Related software

  • inotify-tools. The original tools that inspired me to make fsevents-tools.
  • Lsyncd. A service to keep files synced between a master and one or more slave servers.

More Repositories

1

the_silver_searcher

A code-searching tool similar to ack, but faster.
C
26,124
star
2

jekyll-gallery-generator

A Jekyll plugin that generates photo galleries from directories full of images.
Ruby
350
star
3

dsniff

Dug Song seems to have abandoned dsniff. I got it to work with the latest OS X & Homebrew libraries.
C
330
star
4

lscolors

LSCOLORS Generator
HTML
302
star
5

dotfiles

Shell
19
star
6

twisted_hang

Hack day project. Figure out if the main thread is hanging, and if so, what's causing it to hang.
Python
17
star
7

linksplosion

Chrome extension to open all links in a selection. Great for when you don't have enough tabs open!
JavaScript
8
star
8

memex_trails

Extension that adds Vannevar Bush's "trails" to Chrome.
JavaScript
7
star
9

cogtrack

A tool to track one's cognitive abilities over time.
JavaScript
7
star
10

CursorHide

OS X utility to hide the mouse cursor if it hasn't been moved recently
Objective-C
7
star
11

stag

Sublime Text Ag
Python
6
star
12

history-stats

A Chrome extension that shows graphs about your history. Basically an excuse for me to play with d3.
JavaScript
4
star
13

wtf

Slack bot hackathon thing. Ignore this
TypeScript
3
star
14

serendipity

More convenient video chat
TypeScript
3
star
15

sublime-copy-github-link

Python
3
star
16

crucible

Readability extension for Chrome. Based on the now-defunct readability-redux.
JavaScript
3
star
17

counterforce

Listen for github webhooks and send an e-mail when anyone runs git push --force master.
JavaScript
3
star
18

tail-page

Chrome extension that lets you stay scrolled to the bottom of a page. Particularly helpful for buildbot output.
JavaScript
3
star
19

mpostr

GeoIP Impostor
C
2
star
20

geoff.greer.fm

HTML
2
star
21

cloudkick_tag_exports

Uses the Cloudkick API to build list of IPs for each tag. Handy for automating jobs across a group of servers.
2
star
22

circleci-insights

Use CircleCI Insights API to show which tests fail the most.
TypeScript
1
star
23

react-interview-example

JavaScript
1
star
24

payoff_matrix

Simple web page for displaying payoff matrices
Python
1
star
25

react-redux-example

Example thing that I gave a presentation about
JavaScript
1
star