Open DrewMcArthur opened 10 years ago
This post on HN asks the same and the first answer pretty much nails the problem with that approach.
I am afraid this could be a difficult job to reverse-compile bash to the C-syntax language. Be aware that the Batsh syntax does not cover all functionalities of Bash.
+1
-1 this is in opposition to the entire purpose of Batsh.
-1 - I think this defeats the purpose. By having a simplified language, the output generation is very predictable. There's just too much flexibility in either bash or batch to handle to concept of conversion from one to the other.
Currently, it is only possible to write using the C syntax. It would be great to be able to paste in a bash script I've written, and have it compiled as a batch file.
If it's possible to reverse engineer the compiling, it'd be easy to go bash -> current input (C) -> batch. The hardest part would be reversing the current compiler.