Updated update.py and update_kit.py

This commit is contained in:
2Shirt 2018-11-23 18:21:33 -07:00
parent 7e960df2d6
commit 5da9d4e36b
Signed by: 2Shirt
GPG key ID: 152FAC923B0E132C
2 changed files with 22 additions and 4 deletions

View file

@ -138,7 +138,9 @@ def remove_from_kit(item):
item_locations = [] item_locations = []
for p in [global_vars['BinDir'], global_vars['CBinDir']]: for p in [global_vars['BinDir'], global_vars['CBinDir']]:
item_locations.append(r'{}\{}'.format(p, item)) item_locations.append(r'{}\{}'.format(p, item))
item_locations.append(r'{}\{}.7z'.format(p, item))
item_locations.append(r'{}\_Drivers\{}'.format(p, item)) item_locations.append(r'{}\_Drivers\{}'.format(p, item))
item_locations.append(r'{}\_Drivers\{}.7z'.format(p, item))
for item_path in item_locations: for item_path in item_locations:
remove_item(item_path) remove_item(item_path)
@ -597,6 +599,21 @@ def update_adobe_reader_dc():
download_generic( download_generic(
dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC']) dest, 'Adobe Reader DC.exe', SOURCE_URLS['Adobe Reader DC'])
def update_macs_fan_control():
# Prep
dest = r'{}\Installers'.format(
global_vars['BaseDir'])
# Remove existing installer
try:
os.remove(r'{}\Macs Fan Control.exe'.format(dest))
except FileNotFoundError:
pass
# Download
download_generic(
dest, 'Macs Fan Control.exe', SOURCE_URLS['Macs Fan Control'])
def update_office(): def update_office():
# Remove existing folders # Remove existing folders
remove_from_kit('_Office') remove_from_kit('_Office')

View file

@ -58,6 +58,7 @@ if __name__ == '__main__':
# Installers # Installers
print_info(' Installers') print_info(' Installers')
try_and_print(message='Adobe Reader DC...', function=update_adobe_reader_dc, other_results=other_results, width=40) try_and_print(message='Adobe Reader DC...', function=update_adobe_reader_dc, other_results=other_results, width=40)
try_and_print(message='Macs Fan Control...', function=update_macs_fan_control, other_results=other_results, width=40)
try_and_print(message='MS Office...', function=update_office, other_results=other_results, width=40) try_and_print(message='MS Office...', function=update_office, other_results=other_results, width=40)
try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40) try_and_print(message='Visual C++ Runtimes...', function=update_vcredists, other_results=other_results, width=40)
update_all_ninite(other_results=other_results, width=40) update_all_ninite(other_results=other_results, width=40)