From the controller the function call should be to either install or updated.  See:
https://github.com/mortardata/mortar/blob/master/lib/mortar/local/pig.rb#L98

Checking to see if an update should be done should be pretty easy with the functions in installutil.