| 541 | } |
| 542 | |
| 543 | func getSyncCommands(cmd *latest.SyncExecCommand) (string, []string, string, []string) { |
| 544 | if cmd.Command != "" { |
| 545 | return cmd.Command, cmd.Args, cmd.Command, cmd.Args |
| 546 | } |
| 547 | |
| 548 | var ( |
| 549 | onFileChange = cmd.OnFileChange |
| 550 | onDirCreate = cmd.OnDirCreate |
| 551 | ) |
| 552 | |
| 553 | if onFileChange == nil { |
| 554 | onFileChange = &latest.SyncCommand{} |
| 555 | } |
| 556 | if onDirCreate == nil { |
| 557 | onDirCreate = &latest.SyncCommand{} |
| 558 | } |
| 559 | |
| 560 | return onFileChange.Command, onFileChange.Args, onDirCreate.Command, onDirCreate.Args |
| 561 | } |
| 562 | |
| 563 | func parseExcludeFile(path string) ([]string, error) { |
| 564 | reader, err := os.Open(path) |