Line 551... |
Line 551... |
key_values = lib_dict[tool_name_copy_key].split()
|
key_values = lib_dict[tool_name_copy_key].split()
|
sources = key_values[0::2]
|
sources = key_values[0::2]
|
destinations = key_values[1::2]
|
destinations = key_values[1::2]
|
file_io = list(zip(sources, destinations))
|
file_io = list(zip(sources, destinations))
|
for fpn_io in file_io:
|
for fpn_io in file_io:
|
|
try:
|
sourcePathName = cm.expand_file_path_name(fpn_io[0], lib_path)
|
sourcePathName = cm.expand_file_path_name(fpn_io[0], lib_path)
|
destinationPath = cm.expand_file_path_name(fpn_io[1], build_dir_path)
|
destinationPath = cm.expand_file_path_name(fpn_io[1], build_dir_path)
|
# print("Copy '{}'' to '{}'".format(sourcePathName, destinationPath))
|
# print("Copy '{}'' to '{}'".format(sourcePathName, destinationPath))
|
if isfile(sourcePathName):
|
if isfile(sourcePathName):
|
file_count += 1
|
|
shutil.copy(sourcePathName, destinationPath) # copy file
|
shutil.copy(sourcePathName, destinationPath) # copy file
|
|
file_count += 1
|
else:
|
else:
|
dir_count += 1
|
|
copy_tree(sourcePathName, destinationPath) # copy directory tree (will create new destinationPath directory)
|
copy_tree(sourcePathName, destinationPath) # copy directory tree (will create new destinationPath directory)
|
|
dir_count += 1
|
|
except:
|
|
print("Could not copy source {} to desination {}".format(sourcePathName,destinationPath))
|
print("Copied {} files and {} directories for {} libraries".format(file_count, dir_count, lib_count))
|
print("Copied {} files and {} directories for {} libraries".format(file_count, dir_count, lib_count))
|
|
|
|
|
if __name__ == '__main__':
|
if __name__ == '__main__':
|
# Parse command line arguments
|
# Parse command line arguments
|