Add --force-update option

This commit is contained in:
Eric Torres 2022-03-24 21:58:53 -07:00
parent 2839f6fe80
commit 0bad386fbe
2 changed files with 9 additions and 1 deletions

View File

@ -8,6 +8,8 @@ Version 1.6.1
* Add description to help message * Add description to help message
* Add --force-update option to script
Version 1.6.0 Version 1.6.0
------------- -------------

View File

@ -80,6 +80,12 @@ if __name__ == "__main__":
help="check if enabled in config file", help="check if enabled in config file",
action="store_true", action="store_true",
) )
parser.add_argument(
"-f",
"--force-update",
help="force update regardless if package lists match",
action="store_true",
)
args = parser.parse_args() args = parser.parse_args()
config = configparser.ConfigParser() config = configparser.ConfigParser()
config.read(CONFIG_FILE) config.read(CONFIG_FILE)
@ -113,7 +119,7 @@ if __name__ == "__main__":
) )
print("Gist creation complete.") print("Gist creation complete.")
elif package_lists_match(gist_id): elif package_lists_match(gist_id, packages) and not args.force_update:
print("Package lists match, no update necessary.") print("Package lists match, no update necessary.")
sys.exit(0) sys.exit(0)
else: else: