improve the shell scripts
Merge pull request #1251 from syureyi/sendmail

improve the shell scripts
Merge remote-tracking branch 'upstream/master' into travis.osx