linux script that monitors file changes within folders (like autospec does!)

后端 未结 6 1164
天涯浪人
天涯浪人 2020-12-14 09:16

I want to automatically kick off a build whenever a file changes.

I\'ve used autospec (RSpec) in Ruby and loved that.

How can this be done in bash?

6条回答
  •  被撕碎了的回忆
    2020-12-14 09:53

    If you've entr installed, then in shell you can use the following syntax:

    while true; do find src/ | entr -d make build; done
    

提交回复
热议问题