MATLAB: External shell scripts in compiled GUI

guiMATLAB Compilerscriptshell

I have a set of GUIs that call external shell scripts. I am calling them using unix(./script.sh) or system(./script.sh). I have to use shell scripts because I want to use a lot of awk commands and then pass those arguements to external java programs. This all works perfectly in MATLAB, but when I compile teh GUI, none of the scripts can run. I am including the scripts in the build file, but they do not seem to work. Any advice? Has anyone done this and can walk me through a simple example?
Thanks, Micah

Best Answer

I figured it out - for future reference, the best sequence of steps seems to be: Use file paths that are NOT relative to installation directory First, compile ONLY the .m files (not the .sh or .jar that will have to be called) The, when packaging, just package the .sh and .jar, keeping their directories in the same position relative to the .m (so select the entire directories to package, not each individual .sh or .jar).
Related Question