Added support for pre and post commands#13
Conversation
Two new fields were added to the config. Precmds runs before cmds and links. Postcmds runs after cmds and links. Cmds is no longer necessary but was left in for compatibility.
|
This is useful for a variety of programs. As an example one might use xmonad. First one must install xmonad, then link ones configuration, then after it has been installed one must |
task.go
Outdated
| Rejects [][]string | ||
| Deps []string | ||
| Links [][]string | ||
| Precmds [][]string |
There was a problem hiding this comment.
Please use tabs, not spaces for indentation, rename Precmds to CmdsPre and Postcmds to CmdsPost to conform with naming convention.
task.go
Outdated
| } | ||
| } | ||
|
|
||
| if conf.flags&flagNoCmds == 0 { |
There was a problem hiding this comment.
Combine the if check with the one directly below it, no need to perform the same test twice.
There was a problem hiding this comment.
You should just be able to run gofmt on the source file.
|
Please fix the issues I pointed out, retab the source file. It would be nice if you also updated the documentation to reflect these new features (mention them in the paragraph below):
|
This commit switches indentation to tabs, rather than spaces, removes an unnecessary conditional check and adopts the project naming convention. It also updates the documentation to reflect the changes it creates.
|
I fixed the issues you mentioned. I also edited the docs, althought I feel I might have changed the style of the entry. If you feel that is the case I will try to rewrite them in a style more consistent with the rest of the documentation. |
|
It was close enough, so I merged it in and added some small tweaks. Thanks for the code. |
Two new fields were added to the config. Precmds runs before cmds and
links. Postcmds runs after cmds and links. Cmds is no longer necessary
but was left in for compatibility.