From 96b8430d4a9571ecd44972b3b14dce27f1370a17 Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Fri, 18 Sep 2020 13:55:55 -0700 Subject: [PATCH 1/2] Fix bad variable name when checking for privacy-protected directories --- installinstallmacos.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installinstallmacos.py b/installinstallmacos.py index 1a0c6eb..ac123fb 100755 --- a/installinstallmacos.py +++ b/installinstallmacos.py @@ -510,7 +510,7 @@ def main(): if os.path.expanduser("~") in current_dir: bad_dirs = ['Documents', 'Desktop', 'Downloads', 'Library'] for bad_dir in bad_dirs: - if bad_dir in os.path.split(this_dir): + if bad_dir in os.path.split(current_dir): print('Running this script from %s may not work as expected. ' 'If this does not run as expected, please run again from ' 'somewhere else, such as /Users/Shared.' From 13fb28cdc8e59aca2bcbebeb61590cefad9c04bc Mon Sep 17 00:00:00 2001 From: Greg Neagle Date: Wed, 23 Sep 2020 16:52:24 -0700 Subject: [PATCH 2/2] Add --compress to curl call and hope Apple doesn't decide to violate more HTTP standards. --- installinstallmacos.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/installinstallmacos.py b/installinstallmacos.py index 47c4571..2cfcf57 100755 --- a/installinstallmacos.py +++ b/installinstallmacos.py @@ -261,7 +261,9 @@ def replicate_url(full_url, options = '-fL' else: options = '-sfL' - curl_cmd = ['/usr/bin/curl', options, '--create-dirs', + curl_cmd = ['/usr/bin/curl', options, + '--create-dirs', + '--compressed', '-o', local_file_path] if not ignore_cache and os.path.exists(local_file_path): curl_cmd.extend(['-z', local_file_path])