Skip to content
/ wf Public

wf is a UNIX-style utility for running commands on file change

License

Notifications You must be signed in to change notification settings

zeGolem/wf

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

wf

A UNIX-style utility for running commands on file change.

Build

Dependencies

  • A C compiler (I use clang, but GCC works too) with c11 support

Build instructions

  1. Download the code
 $ git clone https://github.com/zeGolem/wf.git 
 $ cd wf

(or use curl & unzip)

 $ curl https://github.com/zeGolem/wf/archive/refs/heads/master.zip
 $ unzip wf-master.zip
 $ cd wf-master
  1. Build it!
 $ ./build.sh

(if you don't have clang/LLVM on your system, you can use GCC & the standard strip)

CC=gcc STRIP=strip ./build.sh

Systemwide install

Just copy wf to /usr/local/bin/

 $ sudo cp wf /usr/local/bin/

Usage

wf [FILE1] <FILE2> <FILE3> <...> -- [COMMAND TO RUN]

For example:

wf test -- echo test was updated!

will print "test was updated" whenever the file "test" gets written to.

You can also use %F in your command to specify the file name:

wf test1 test2 -- echo The file %F was updated.

This will print "The file test1 was updated." when test1 is written to, and "The file test2 was updated." when test2 is.

About

wf is a UNIX-style utility for running commands on file change

Resources

License

Stars

Watchers

Forks

Packages

No packages published