On Mon, Jun 27, 2016 at 2:23 AM, Jason White via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote:
On Monday, 20 June 2016 at 08:21:29 UTC, Dicebot wrote:
On Monday, 20 June 2016 at 02:46:13 UTC, Jason White wrote:
This actually sounds nice. Main problem that comes to my mind is that there is no cross-platform shell script. Even if it is list of plain unconditional commands there are always differences like normalized path form. Of course, one can always generate `build.d` as a shell script, but that would only work for D projects and Button is supposed to be a generic solution.

I'd make it so it could either produce a Bash or Batch script. Possibly also a PowerShell script because error handling in Batch is awful. That should cover any platform it might be needed on. Normalizing paths shouldn't be a problem either.

This should actually be pretty easy to implement.

Will plain sh script script also work for MacOS / BSD flavors? Committing just two scripts is fine but I wonder how it scales.

FYI, I implemented this feature today (no Batch/PowerShell output yet though):

    http://jasonwhite.github.io/button/docs/commands/convert

I think Bash should work on most Unix-like platforms.

And there is this[0] for windows, if you wanted to try bash on windows:


[0]: https://msdn.microsoft.com/en-us/commandline/wsl/about