I'm fairly sure the answer to the title is 'no'. However, I'd like some suggestions because I'm not able to gracefully solve this seemingly simple problem. Here's what I'd like to do in a single rule that works unmodified in Linux and Windows:
- Run a shell command that produces a certain directory as part of its output. The name of the shell command is identical in Linux and Windows, so it works in both places unmodified.
- Rename the directory using pathlib or some other Python module so it works transparently in Linux and Windows.
That's it!
Here's what I have come up with already which I don't want to do because they seem clunky:
- Run the executable and do the rename in a shell. For this I need to make custom command lines based on which platform I'm on. (Linux 'mv' vs. Windows 'rename') Yuck.
- Make another rule that runs automatically and does the rename after this rule. This is a little better but still doesn't seem "right".
I'll bet there's an elegant solution, but what is it?