What I wish to know is whether there is something similar to binfmt-support on mac.
I have a nacl binary executable and I wish to make mac aware of the executable format so thatI can run this executable from command prompt directly.
I have seen people using binfmt-support on linux to achieve this.
Just to explain what I want in more simple terms - Say I have a.nexe file. I can run this file on mac terminal with command "../tools/sel_ldr_x86_32 -B ../tools/irt_core_x86_32.nexe a.nexe"
Instead of this big command, I wish to simply run it like "./a.nexe" and my shell file should then get invoked which would eventually call the command like "../tools/sel_ldr_x86_32 -B ../tools/irt_core_x86_32.nexe a.nexe"
If the file itself is binary, so you can not add a #! to the start of the file, then so far as I know you only have one option; create an alias for the command line in your ~/.bashrc file:
alias nacl='/path/to/sel_ldr_x86_32 -B /path/to/irt_core_x86_32.nexe'
which would then let you type
nacl a.nexe at the command line.
NOTE: You will want to use absolute paths in your alias for this to work correctly.