add -J option
This commit is contained in:
parent
6c3db57dde
commit
2afd8b20c6
2 changed files with 5 additions and 0 deletions
|
|
@ -207,6 +207,10 @@ int main(int argc, char* argv[])
|
|||
if(destfile.substr(0,5) != "/dev/")
|
||||
ztd::exec("chmod", "+x", destfile);
|
||||
}
|
||||
else if(options['J'])
|
||||
{
|
||||
std::cout << gen_json_struc(sh) << std::endl;
|
||||
}
|
||||
else // to console
|
||||
{
|
||||
std::cout << sh->generate(g_shebang, 0);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ ztd::option_set gen_options()
|
|||
ztd::option('c', "stdout", false, "Output result script to stdout"),
|
||||
ztd::option('e', "exec", false, "Directly execute script"),
|
||||
ztd::option("no-shebang", false, "Don't output shebang"),
|
||||
ztd::option('J', "json", false, "Output the json structure"),
|
||||
ztd::option("\r [Processing]"),
|
||||
ztd::option('C', "no-cd", false, "Don't cd when doing %include and %resolve"),
|
||||
ztd::option('m', "minimize", false, "Minimize code without changing functionality"),
|
||||
|
|
|
|||
Loading…
Reference in a new issue