Adding script file into .adef


Following this

I want to add script file named into the application and it must run before application starts

( /usr/bin/ )
( applicationComponent )


[x] script/ /usr/bin/
// [x] script/ /usr/bin/ also same error

Could not exec ‘/usr/bin/’. No such file or directory.

What do I miss?


Hi @raxsix
I wonder if absolute paths are supported in the run section…
I would bundle the script in the /bin folder of the sandbox (which is in the path) and call it without path in the run section.

Please note that:

  • you’ll also need to bind the /bin/sh executable in the sandbox, otherwise your script won’t run (you don’t have sh by default in the sandbox)
  • I think that executables are launched in parallel on the run section, so you can’t expect that your app will be launched after the script is terminated.


What about just calling the script via a system (system("/bin/sh /usr/bin/")) call at the front end of your app? That will provide that it runs before your app gets going.


I like your idea but can you give me some more info how to implement this
Where do you put that
system (system("/bin/sh /usr/bin/"))?


Just one “system” call.
system("/bin/sh ./");

Add it to your “bundles” to put it in your local directory in your adef like this:
[xr] …/ ./ //or [xr] …/ ./bin/ this assumes that the you wrote is in your project //directory


Ok thanks, I will try it out