mirror of
https://github.com/grahampugh/macadmin-scripts.git
synced 2025-12-17 17:56:33 +00:00
Add latest_valid_build to the plist output
This commit is contained in:
parent
b1b7a8d02e
commit
881c394399
@ -1063,7 +1063,6 @@ def main():
|
|||||||
|
|
||||||
# determine the latest valid build ID and select this
|
# determine the latest valid build ID and select this
|
||||||
# when using auto, os and version options
|
# when using auto, os and version options
|
||||||
if args.auto or args.version or args.os:
|
|
||||||
if args.beta or "Beta" not in product_info[product_id]["title"]:
|
if args.beta or "Beta" not in product_info[product_id]["title"]:
|
||||||
try:
|
try:
|
||||||
latest_valid_build
|
latest_valid_build
|
||||||
@ -1078,10 +1077,7 @@ def main():
|
|||||||
if latest_valid_build == args.newer_than_version:
|
if latest_valid_build == args.newer_than_version:
|
||||||
continue
|
continue
|
||||||
# if using renew option, skip if the same as the current version
|
# if using renew option, skip if the same as the current version
|
||||||
if (
|
if args.renew and build_info[0] == product_info[product_id]["version"]:
|
||||||
args.renew
|
|
||||||
and build_info[0] == product_info[product_id]["version"]
|
|
||||||
):
|
|
||||||
continue
|
continue
|
||||||
answer = index + 1
|
answer = index + 1
|
||||||
else:
|
else:
|
||||||
@ -1148,6 +1144,12 @@ def main():
|
|||||||
|
|
||||||
# Output a plist of available updates and quit if list option chosen
|
# Output a plist of available updates and quit if list option chosen
|
||||||
if args.list:
|
if args.list:
|
||||||
|
try:
|
||||||
|
print("\nLatest valid build: %s (# %s)" % (latest_valid_build, answer))
|
||||||
|
pl["latest_valid_build"] = latest_valid_build
|
||||||
|
except NameError:
|
||||||
|
pl["latest_valid_build"] = ""
|
||||||
|
print("\nNo valid build found")
|
||||||
write_plist(pl, output_plist)
|
write_plist(pl, output_plist)
|
||||||
print("\nValid seeding programs are: %s\n" % ", ".join(get_seeding_programs()))
|
print("\nValid seeding programs are: %s\n" % ", ".join(get_seeding_programs()))
|
||||||
exit(0)
|
exit(0)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user