From 4ef716471e4879833cc3804d81bebf1bfa5e24fb Mon Sep 17 00:00:00 2001 From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 25 Jun 2012 04:37:27 +0200 Subject: dohtml: Add .ico, .svg, .xhtml and .xml extensions to default list in EAPI="4-python". --- bin/dohtml.py | 20 +++++++++++--------- doc/package/ebuild/eapi/4-python.docbook | 6 ++++++ 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/bin/dohtml.py b/bin/dohtml.py index 96e78ef6f..ba16b4662 100755 --- a/bin/dohtml.py +++ b/bin/dohtml.py @@ -11,18 +11,18 @@ # # # Detailed usage: -# dohtml -# - will install the files in the list of files (space-separated list) into +# dohtml +# - will install the files in the list of files (space-separated list) into # /usr/share/doc/${PF}/html, provided the file ends in .css, .gif, .htm, # .html, .jpeg, .jpg, .js or .png. # dohtml -r -# - will do as 'dohtml', but recurse into all directories, as long as the +# - will do as 'dohtml', but recurse into all directories, as long as the # directory name is not CVS # dohtml -A jpe,java [-r] # - will do as 'dohtml' but add .jpe,.java (default filter list is # added to your list) # dohtml -a png,gif,html,htm [-r] -# - will do as 'dohtml' but filter on .png,.gif,.html,.htm (default filter +# - will do as 'dohtml' but filter on .png,.gif,.html,.htm (default filter # list is ignored) # dohtml -x CVS,SCCS,RCS -r # - will do as 'dohtml -r', but ignore directories named CVS, SCCS, RCS @@ -88,7 +88,7 @@ class OptionsClass: self.PF = "" self.ED = "" self.DOCDESTTREE = "" - + if "PF" in os.environ: self.PF = os.environ["PF"] if "force-prefix" not in os.environ.get("FEATURES", "").split() and \ @@ -98,8 +98,10 @@ class OptionsClass: self.ED = os.environ.get("ED", "") if "_E_DOCDESTTREE_" in os.environ: self.DOCDESTTREE = os.environ["_E_DOCDESTTREE_"] - + self.allowed_exts = ['css', 'gif', 'htm', 'html', 'jpeg', 'jpg', 'js', 'png'] + if os.environ.get("EAPI", "0") in ("4-python",): + self.allowed_exts += ['ico', 'svg', 'xhtml', 'xml'] self.allowed_files = [] self.disallowed_dirs = ['CVS'] self.recurse = False @@ -126,7 +128,7 @@ def print_help(): def parse_args(): options = OptionsClass() args = [] - + x = 1 while x < len(sys.argv): arg = sys.argv[x] @@ -158,7 +160,7 @@ def parse_args(): else: args.append(sys.argv[x]) x += 1 - + return (options, args) def main(): @@ -171,7 +173,7 @@ def main(): print("Allowed files :", options.allowed_files) success = False - + for x in args: basename = os.path.basename(x) dirname = os.path.dirname(x) diff --git a/doc/package/ebuild/eapi/4-python.docbook b/doc/package/ebuild/eapi/4-python.docbook index 8420abb29..ec5fd83c4 100644 --- a/doc/package/ebuild/eapi/4-python.docbook +++ b/doc/package/ebuild/eapi/4-python.docbook @@ -5,6 +5,12 @@
Helpers +
+ Extended default list of extensions in dohtml + + dohtml by default additionally installs files with .ico, .svg, .xhtml and .xml extensions. + +
Helpers Banned in Global Scope -- cgit v1.2.3-1-g7c22