# This function will set the interrupt variable so prepbuildsummary can output the right build status on receiving
# ctrl-c from the user during a manual build.
interruptsummary() {
  echo "Caught Keyboard Interrupt..."
  SM_WASINTERRUPTED="1"
  # If SM_INSTALLPROMPT and SM_EXTRACTPROMPT are set and the prompt is invoked after a successful build, hitting
  # ctrl-C will only set the above SM_WASINTERRUPTED variable repeatedly and won't return user to the shell because
  # of the interrupt (SIGINT) trap set way below. Putting exit 0 is a decent way to get out of that prompt

  # Clean up stale files like $APP.APP, $APP.BUILD and $APP.VERSION
  if [ -z "$SM_AUTOBUILD" ] ; then
    rm -f $SM_PARENTTMP/$APP.APP,BUILD,VERSION}
  fi

  exit 0
}

