I am trying to do everything with shell script because mixing shell and functions are impossible.
I have a shell script I want to copy to "./build/editor-scripts/"
the first time I run the script the folder isnāt there. Therefore I have to create it I donāt hae access to os.execute
so I need to do
command = {"mkdir" ,"-p", "./build/editor-scripts/"}
After the folder is created I want move the file into it. The normal way to do this is with file:write
but becuase I am now in the return statement of the "run"
function I canāt use any lua. Therefore I need to rediret the output of the shell file into the new file.
command = {"echo", editor.get("/editor-script-cleanup/scripts/extend_path.sh", "text"), ">", "./build/editor-scripts/extend_path.sh"}
But it seem that the echo is only redirected to Defoldās console regardless that I tell it to redirect it to the file, so no file is created.
Ticket #2821
Any other ideas how to do this?