Merge branch 'munki-main'

This commit is contained in:
Graham Pugh 2020-09-24 09:52:38 +02:00
commit e45b738ac9

View File

@ -382,8 +382,11 @@ def replicate_url(
if show_progress: if show_progress:
options = "-fL" options = "-fL"
else: else:
options = "-sfL" options = '-sfL'
curl_cmd = ["/usr/bin/curl", options, "--create-dirs", "-o", local_file_path] curl_cmd = ['/usr/bin/curl', options,
'--create-dirs',
'--compressed',
'-o', local_file_path]
if not ignore_cache and os.path.exists(local_file_path): if not ignore_cache and os.path.exists(local_file_path):
curl_cmd.extend(["-z", local_file_path]) curl_cmd.extend(["-z", local_file_path])
if attempt_resume: if attempt_resume:
@ -807,12 +810,10 @@ def main():
bad_dirs = ["Documents", "Desktop", "Downloads", "Library"] bad_dirs = ["Documents", "Desktop", "Downloads", "Library"]
for bad_dir in bad_dirs: for bad_dir in bad_dirs:
if bad_dir in os.path.split(current_dir): if bad_dir in os.path.split(current_dir):
print( print('Running this script from %s may not work as expected. '
"Running this script from %s may not work as expected. " 'If this does not run as expected, please run again from '
"If this does not run as expected, please run again from " 'somewhere else, such as /Users/Shared.'
"somewhere else, such as /Users/Shared." % current_dir, % current_dir, file=sys.stderr)
file=sys.stderr,
)
if args.catalogurl: if args.catalogurl:
su_catalog_url = args.catalogurl su_catalog_url = args.catalogurl