Skip to content

Instantly share code, notes, and snippets.

@tfcollins
Created July 13, 2020 18:50
Show Gist options
  • Save tfcollins/30d062e9f631d58a6761f792bc0eb38c to your computer and use it in GitHub Desktop.
Save tfcollins/30d062e9f631d58a6761f792bc0eb38c to your computer and use it in GitHub Desktop.
#!/bin/bash
screen -S Installer -dm bash -c "$1/$2/bin/matlab $3 -r 'genLTEPAInstaller'"
echo "MATLAB launched"
for ii in {1..500}
do
echo $ii
echo "Active MATLAB session IDs: $(pidof MATLAB)"
screen -list | grep Installer
if [ -f LTEPA/for_redistribution/LTEPAInstaller.install ]; then
echo "Generated installer found"
echo "Stopping MATLAB"
sleep 4
screen -X -S Installer quit
screen -list
exit 0
fi
sleep 1
done
exit 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment