+def make_variables(d, options):
+ """Make .scripts/variables which contains variables based off of
+ what was regexed out of existing configuration files."""
+ variables = d.extract()
+ if not options.dry_run: f = open(".scripts/variables", "w")
+ for k,v in variables.items():
+ if v is None:
+ # once we get everything on the same version, you should
+ # actually start paying attention to these warnings
+ logging.warning("Variable %s not found" % k)
+ else:
+ logging.debug("Variable %s is %s" % (k,v))
+ if not options.dry_run:
+ f.write("%s %s\n" % (k,v))
+ else:
+ logging.info('# write line "%s %s" to .scripts/variables' % (k,v))
+ if not options.dry_run: f.close()
+
+class Error(command.Error):