Support writing to a different file
diff --git a/scripts/config.py b/scripts/config.py
index a1d932f..9fe2e51 100755
--- a/scripts/config.py
+++ b/scripts/config.py
@@ -330,6 +330,8 @@
         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',
@@ -389,7 +391,7 @@
             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