This is some nice code found on stack overflow that I have been using for a while that seems very reliable. I just commented out a few things since we really only want to check if it needs an update or if it is already up to date.