Skip to content

Instantly share code, notes, and snippets.

@andreibosco
Created December 7, 2019 23:41
Show Gist options
  • Save andreibosco/78b4e8a246ab52cb3732266df98fccbe to your computer and use it in GitHub Desktop.
Save andreibosco/78b4e8a246ab52cb3732266df98fccbe to your computer and use it in GitHub Desktop.
bash script to run cpntools on macOS
#!/bin/bash
chmod +x ./cpnsim/run.x86-darwin
chmod +x ./cpnsim/cpnmld.x86-darwin
RUNNING=$(ps ax | grep cpnmld)
echo "$RUNNING" | grep "cpnmld.x86-darwin"
if [ "$(echo "$RUNNING" | grep "cpnmld.x86-darwin")" == "" ]; then
./cpnsim/cpnmld.x86-darwin -d 2098 ./run.x86-darwin ./sim_out.log &
fi
wine ./cpntools.exe
#killall cpnmld.x86-darwin
@andreibosco
Copy link
Author

When closing CPN Tools, the simulator process will remain running in the background.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment