Removed network installers
This commit is contained in:
parent
ad1d7d71f2
commit
4a96736592
2 changed files with 0 additions and 36 deletions
|
|
@ -182,37 +182,6 @@ def resolve_dynamic_url(source_url, regex):
|
||||||
return url
|
return url
|
||||||
|
|
||||||
|
|
||||||
def scan_for_net_installers(server, family_name, min_year):
|
|
||||||
"""Scan network shares for installers."""
|
|
||||||
if not server['Mounted']:
|
|
||||||
mount_network_share(server)
|
|
||||||
|
|
||||||
if server['Mounted']:
|
|
||||||
for year in os.scandir(r'\\{IP}\{Share}'.format(**server)):
|
|
||||||
try:
|
|
||||||
year_ok = int(year.name) < min_year
|
|
||||||
except ValueError:
|
|
||||||
year_ok = False # Skip non-year items
|
|
||||||
if year_ok:
|
|
||||||
# Don't support outdated installers
|
|
||||||
continue
|
|
||||||
for version in os.scandir(year.path):
|
|
||||||
section = r'Installers\Extras\{}\{}'.format(
|
|
||||||
family_name, year.name)
|
|
||||||
if section not in LAUNCHERS:
|
|
||||||
LAUNCHERS[section] = {}
|
|
||||||
name = version.name
|
|
||||||
if re.search(r'(exe|msi)$', name, re.IGNORECASE):
|
|
||||||
name = name[:-4]
|
|
||||||
if name not in LAUNCHERS[section]:
|
|
||||||
LAUNCHERS[section][name] = {
|
|
||||||
'L_TYPE': family_name,
|
|
||||||
'L_PATH': year.name,
|
|
||||||
'L_ITEM': version.name,
|
|
||||||
}
|
|
||||||
umount_network_share(server)
|
|
||||||
|
|
||||||
|
|
||||||
# Data Recovery
|
# Data Recovery
|
||||||
def update_testdisk():
|
def update_testdisk():
|
||||||
# Stop running processes
|
# Stop running processes
|
||||||
|
|
|
||||||
|
|
@ -110,11 +110,6 @@ if __name__ == '__main__':
|
||||||
width=40,
|
width=40,
|
||||||
item = item)
|
item = item)
|
||||||
|
|
||||||
## Search for network Office/QuickBooks installers & add to LAUNCHERS
|
|
||||||
print_success('Scanning for network installers')
|
|
||||||
scan_for_net_installers(OFFICE_SERVER, 'Office', min_year=2010)
|
|
||||||
scan_for_net_installers(QUICKBOOKS_SERVER, 'QuickBooks', min_year=2015)
|
|
||||||
|
|
||||||
## Generate Launchers
|
## Generate Launchers
|
||||||
print_success('Generating launchers')
|
print_success('Generating launchers')
|
||||||
for section in sorted(LAUNCHERS.keys()):
|
for section in sorted(LAUNCHERS.keys()):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue