summaryrefslogtreecommitdiff
path: root/buildscripts/make_archive.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildscripts/make_archive.py')
-rwxr-xr-xbuildscripts/make_archive.py17
1 files changed, 15 insertions, 2 deletions
diff --git a/buildscripts/make_archive.py b/buildscripts/make_archive.py
index 840b134e717..5df995b41e9 100755
--- a/buildscripts/make_archive.py
+++ b/buildscripts/make_archive.py
@@ -29,12 +29,23 @@ For a detailed usage example, see src/SConscript.client or src/mongo/SConscript.
import optparse
import os
import sys
+import shlex
import shutil
import zipfile
from subprocess import (Popen, PIPE, STDOUT)
def main(argv):
- opts = parse_options(argv[1:])
+ args = []
+ for arg in argv[1:]:
+ if arg.startswith("@"):
+ file_name = arg[1:]
+ f_handle = open(file_name, "r")
+ args.extend(s1.strip('"') for s1 in shlex.split(f_handle.readline(), posix=False))
+ f_handle.close()
+ else:
+ args.append(arg)
+
+ opts = parse_options(args)
if opts.archive_format in ('tar', 'tgz'):
make_tar_archive(opts)
elif opts.archive_format in ('zip'):
@@ -170,7 +181,9 @@ def get_preferred_filename(input_filename, transformations):
returns the substituted string
'''
for match, replace in transformations:
- if input_filename.startswith(match):
+ match_lower = match.lower()
+ input_filename_lower = input_filename.lower()
+ if input_filename_lower.startswith(match_lower):
return replace + input_filename[len(match):]
return input_filename