As part of testing exported models, I realized that model.sh files generated during export contain several absolute paths to the export directory. Ideally from my perspective, .sh files should avoid including absolute paths, e.g. so the entire export directory can be arbitrarily relocated (less any external path dependencies in the model).
A simplified export script might be something like the following, where the working directory would be controlled by the user / client code:
#!/bin/bash
./model.bin >> out 2>> err
if [ $? -eq 0 ]; then
echo success > finished
else
echo failure > finished
fi