If I use a "Run Shell Script" action, and then drag an "If" beneath it... it seems it's only able to interact with "Shell Script Result", which I think is any terminal output.
This means the If block can only switch on whether there's output or not.
Is there a way I can switch on exit status? I'd like to pop up a notification on success, or a warning message on failure.

echo $?at the end of your script, you can do a numeric comparison (equal, greater than, etc).$?is a variable set by the shell that stores the exit status of the most recently executed command, as mentioned in bmike's comment.print foo && print success || print failure.