4 ms·
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machi
by robertelder 10y ago
I don't use windows much anymore so there might be a better way to do this, but I'll propose a use case: Automating the installation of python on a fresh machine.
- choward 10y agoHow are you going to install batsh though?
- xyience 10y agoFresh machine where and for whom? I doubt a simple batch script will get you very far (setup.exe exists for a reason...), and I doubly-doubt you would have enough overlap in the process that something that can convert the steps to bash would be an advantage. The only advantage I see for batsh is that it looks nicer to write in for the tiny subset of batch it supports. But then so is pretty much anything else -- it wouldn't surprise me if someone has already written a DSL in a well known language that can output to batch or powershell, we don't need a whole new language for this.
- deleted 10y ago[deleted]
- robertelder 10y agoOk, I'll try another use case: Political differences (specifically licensing). This project appears to be licensed under MIT, and python appears to be licensed under !MIT. I don't know what the implications are for the licensing of machine-produced shell code, or binary versions of Python, but I'm sure there are companies out there that would have opinions to favour one alternative over the other for reasons other than the technical merits of the choice.
- xyience 10y agoMaybe. Python is under an MIT-like license, so you're fine, but if it were under e.g. the GPL you could still look to see if they have some form of runtime exception as GCC does. In any case it's rare for a company that's not well-established to care more about licensing that technical merit (and even any that do, the typical approach is to ask to buy a separate license if possible), and it's also rare that a company would use such a tool as this (created as a hackday project, in Ocaml, according to the author) rather than finding an alternative that meets their licensing criteria or just developing it in-house since it's not that big a tool and lacks a lot of useful capabilities like piping.
- somabc 10y agoIn that case you would use the chocolatey package manager bootstrapped by powershell to silently install Python. It's a oneliner in powershell followed by choco install Python.