Sha256: ca379fbaeaf2663c54a0c1149e17e10573f2fbee8af65f0963a94f3c483fb4b5

Contents?: true

Size: 980 Bytes

Versions: 1

Compression:

Stored size: 980 Bytes

Contents

#!/usr/bin/env ruby
=begin =======================================================================

# TORK-HERALD 1 2012-09-26 18.2.3

## NAME

tork-herald - reports modified files

## SYNOPSIS

`tork-herald` [*OPTION*]...

## DESCRIPTION

This program monitors the current working directory and prints relative paths
of modified files in batches of single-line JSON arrays to the standard output
stream.

## OPTIONS

`-h`, `--help`
  Show this help manual.

## SEE ALSO

tork(1), tork-herald(1), tork-driver(1), tork-engine(1), tork-master(1)

=end =========================================================================

$0 = File.basename(__FILE__) # for easier identification in ps(1) output

require 'binman'
BinMan.help

require 'json'
STDOUT.sync = true # flush puts() output immediately after writing

require 'listen'
Listen.to('.', :relative_paths => true) do |modified, added, removed|
  files = modified + added
  puts JSON.dump(files) unless files.empty?
end.start

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
tork-18.2.3 bin/tork-herald