NEWS file for coverty-submit
+1.4 @
+ Make it safe for multiple users on the same machine.
+ Implement a verbosityu option.
+
1.3 @ 2012-11-22
Minor documentation updates.
#
# By Eric S. Raymond, May 2012. BSD terms apply.
#
-import os, sys, ConfigParser, getopt
+import os, sys, ConfigParser, getopt, tempfile
version = "1.3"
""" % globals()
if verbose:
sys.stdout.write(readme)
+ tmpdir = tempfile.mkdtemp()
if not noexec:
- with open("/tmp/README", "w") as wfp:
+ with open(os.path.join(tmpdir, "README"), "w") as wfp:
wfp.write(readme)
tarball = "%s-scan.tgz" % project
- do_or_die("mv cov-int /tmp; (cd /tmp; tar -czf %s README cov-int; rm -fr cov-int)" % tarball)
+ do_or_die("mv cov-int %s; (cd %s; tar -czf %s README cov-int; rm -fr README cov-int)" % (tmpdir, tmpdir, tarball))
print("Posting the analysis request...")
do_or_die('''curl \
--form file=@/tmp/%(tarball)s \
--form project=%(project)s \
--form password=%(password)s \
--form email=%(email)s \
- http://scan5.coverity.com/cgi-bin/upload.py
- ''' % globals())
-
+ http://scan5.coverity.com/cgi-bin/upload.py \
+ ''' % globals())
+ try:
+ os.remove(os.path.join(tmpdir, tarball))
+ os.rmdir(tmpdir)
+ except OSError:
+ pass
print("Done. You'll get mail at %s." % email)
# The following sets edit modes for GNU EMACS