From 4efaeba48bd9bd65ead3a7f801e4587fa0e241f3 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Sat, 27 Jul 2019 23:44:01 +0200 Subject: [PATCH] Support writing to a different file --- scripts/config.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/config.py b/scripts/config.py index 7293e11b4..ac2a298d3 100755 --- a/scripts/config.py +++ b/scripts/config.py @@ -323,6 +323,8 @@ if __name__ == '__main__': parser.add_argument('--force', '-o', help="""For the set command, if SYMBOL is not present, add a definition for it.""") + parser.add_argument('--write', '-w', + help="""File to write to instead of the input file.""") subparsers = parser.add_subparsers(dest='command', title='Commands') parser_get = subparsers.add_parser('get', @@ -382,7 +384,7 @@ if __name__ == '__main__': config.unset(args.symbol) else: config.adapt(args.adapter) - config.write() + config.write(args.write) # Import modules only used by main only if main is defined and called. # pylint: disable=wrong-import-position