LoginSignup
35
35

More than 5 years have passed since last update.

fswatch でディレクトリを監視して、変更があったら何かする(rspecとか)

Last updated at Posted at 2014-03-12

fswatch が便利。ディレクトリを監視して、変更があったら何かするということが出来る。

$ brew install fswatch
$ fswatch /var/www/some_directory:/var/www/some_other_directory "rspec ./spec/hoge_spec.rb"

のように、"監視対象のディレクトリ" "実行したい何か" を引数に指定する。

監視対象ディレクトリは「:」で複数指定できる。

rspec や spec だったら他の方法でもなにかあるやろうけど。(タグ、不適切かな…)

サクッと何かを監視して何かを実行したい時とかは便利。

35
35
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
35
35