mirror of
https://github.com/corpnewt/gibMacOS.git
synced 2024-09-20 09:30:34 +00:00
Fixes for cli args
This commit is contained in:
parent
c8f3951c1e
commit
6b2da8fafe
1 changed files with 11 additions and 5 deletions
|
@ -228,23 +228,27 @@ class gibMacOS:
|
|||
self.download_prod(self.mac_prods[menu-1])
|
||||
|
||||
def get_latest(self):
|
||||
self.u.head("Downloading Latest")
|
||||
print("")
|
||||
self.download_prod(self.mac_prods[-1])
|
||||
|
||||
def get_for_product(self, prod):
|
||||
self.u.head("Downloading for {}".format(prod))
|
||||
print("")
|
||||
for p in self.mac_prods:
|
||||
if p["product"] == prod:
|
||||
self.download_prod(prod)
|
||||
self.download_prod(p)
|
||||
return
|
||||
print("{} not found".format(prod))
|
||||
|
||||
def get_for_version(self, vers):
|
||||
if str(vers).startswith("10."):
|
||||
vers = str(vers)[3:]
|
||||
self.u.head("Downloading for {}".format(vers))
|
||||
print("")
|
||||
for p in self.mac_prods:
|
||||
if p["version"] == vers:
|
||||
self.download_prod(prod)
|
||||
self.download_prod(p)
|
||||
return
|
||||
print("{} not found".format(vers))
|
||||
print("10.{} not found".format(vers))
|
||||
|
||||
if __name__ == '__main__':
|
||||
parser = argparse.ArgumentParser()
|
||||
|
@ -268,5 +272,7 @@ if __name__ == '__main__':
|
|||
g.get_for_version(args.version)
|
||||
exit()
|
||||
|
||||
print("main")
|
||||
|
||||
while True:
|
||||
g.main()
|
||||
|
|
Loading…
Reference in a new issue