Commit abcb41a1 authored by ben's avatar ben

makedist can now build FAQ separately (--faq-only)


git-svn-id: http://svn.savannah.nongnu.org/svn/rdiff-backup@227 2b77aa54-bcbc-44c9-a7ec-4f6cf2b41109
parent 151c6d6f
#!/usr/bin/env python
import os, re, shutil, time, sys
import os, re, shutil, time, sys, getopt
SourceDir = "src"
DistDir = "dist"
......@@ -119,19 +119,36 @@ def MakeSpecFile():
VersionedCopy(spec_template, specfile)
return specfile
def parse_cmdline(arglist):
"""Returns action"""
global Version
def error():
print "Syntax: makedist [--faq-only] [version_number]"
sys.exit(1)
optlist, args = getopt.getopt(arglist, "", ["faq-only"])
if len(args) != 1: error()
else: Version = args[0]
for opt, arg in optlist:
if opt == "--faq-only": return "FAQ"
else: assert 0, "Bad argument"
return "All"
def Main():
action = parse_cmdline(sys.argv[1:])
if action == "FAQ":
print "Making FAQ"
MakeFAQ()
else:
assert action == "All"
print "Processing version " + Version
tarfile = MakeTar()
print "Made tar file " + tarfile
specfile = MakeSpecFile()
print "Made specfile ", specfile
if __name__ == "__main__" and not globals().has_key('__no_execute__'):
if len(sys.argv) != 2:
print "Syntax: makedist [version_number]"
sys.exit(1)
Version = sys.argv[1]
Main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment