Skip to content

Commit

Permalink
-S flag lets you specify the same script for every trigger.
Browse files Browse the repository at this point in the history
  • Loading branch information
Urethramancer committed Oct 20, 2016
1 parent f2354e1 commit f09762c
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (

const (
program = "Sentinel"
version = "0.4.2"
version = "0.5.0"
// ACTION is the environment variable for the type of notification triggered.
ACTION = "SENTINEL_ACTION"
// PATH is the environment variable for the type of notification triggered.
Expand Down Expand Up @@ -109,6 +109,14 @@ func main() {
flags |= fsnotify.Chmod
}

if opts.Commands.ScriptAction != "" {
opts.Commands.ChmodAction = opts.Commands.ScriptAction
opts.Commands.CreateAction = opts.Commands.ScriptAction
opts.Commands.DeleteAction = opts.Commands.ScriptAction
opts.Commands.RenameAction = opts.Commands.ScriptAction
opts.Commands.WriteAction = opts.Commands.ScriptAction
}

watcher, err := fsnotify.NewWatcher()
if err != nil {
return
Expand Down

0 comments on commit f09762c

Please sign in to comment.