From: Wayne Davison Date: Sun, 16 Jan 2022 02:59:11 +0000 (-0800) Subject: Get md-convert to output the release html files in the right dir. X-Git-Tag: v3.2.4pre3~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=d2cc1149b3546b0e9103e03aa91c1bedd14579b4;p=thirdparty%2Frsync.git Get md-convert to output the release html files in the right dir. --- diff --git a/md-convert b/md-convert index f95f34b7..900fef16 100755 --- a/md-convert +++ b/md-convert @@ -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.") diff --git a/packaging/release-rsync b/packaging/release-rsync index 1d1e6cc2..78f1676f 100755 --- a/packaging/release-rsync +++ b/packaging/release-rsync @@ -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")