]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Get md-convert to output the release html files in the right dir.
authorWayne Davison <wayne@opencoder.net>
Sun, 16 Jan 2022 02:59:11 +0000 (18:59 -0800)
committerWayne Davison <wayne@opencoder.net>
Sun, 16 Jan 2022 03:12:03 +0000 (19:12 -0800)
md-convert
packaging/release-rsync

index f95f34b7e2954bd92ccd8990339c4585261a6d69..900fef1665cb2e88f90e049e57b9b5b68e3a505c 100755 (executable)
@@ -172,6 +172,8 @@ def parse_md_file(mdfn):
     if fi.want_manpage:
         output_list += [ (fi.name, fi.man_out) ]
     for fn, txt in output_list:
+        if args.dest and args.dest != '.':
+            fn = os.path.join(args.dest, fn)
         if os.path.lexists(fn):
             os.unlink(fn)
         print("Wrote:", fn)
@@ -543,6 +545,7 @@ def die(*msg):
 if __name__ == '__main__':
     parser = argparse.ArgumentParser(description="Output html and (optionally) nroff for markdown pages.", add_help=False)
     parser.add_argument('--test', action='store_true', help="Just test the parsing without outputting any files.")
+    parser.add_argument('--dest', metavar='DIR', help="Put files into DIR instead of the current directory.")
     parser.add_argument('--debug', '-D', action='count', default=0, help='Output copious info on the html parsing. Repeat for even more.')
     parser.add_argument("--help", "-h", action="help", help="Output this help message and exit.")
     parser.add_argument("mdfiles", nargs='+', help="The source .md files to convert.")
index 1d1e6cc202a2872bdab8f37a03e75ba31762c87e..78f1676fd7bf074e9faae9cf06a0c4d4f4cdb5fb 100755 (executable)
@@ -341,7 +341,7 @@ About to:
     md_files = 'README.md NEWS.md INSTALL.md'.split()
     html_files = [ fn for fn in gen_pathnames if fn.endswith('.html') ]
     cmd_chk(['rsync', '-a', *md_files, *html_files, dest])
-    cmd_chk(["./md-convert"] + [ dest +'/'+ fn for fn in md_files ])
+    cmd_chk(["./md-convert", "--dest", dest, *md_files])
 
     cmd_chk(f"git log --name-status | gzip -9 >{dest}/ChangeLog.gz")