@@ -395,6 +395,8 @@ def install(args):
395
395
# Install swiftpm content in all of the passed prefixes.
396
396
for prefix in args .install_prefixes :
397
397
install_swiftpm (prefix , args )
398
+ config_path = os .path .join (os .path .dirname (os .path .abspath (__file__ )), "config.json" )
399
+ install_file (args , config_path , os .path .join (os .path .join (prefix , "share" ), "pm" ))
398
400
399
401
# Install libSwiftPM if an install directory was provided.
400
402
if args .libswiftpm_install_dir :
@@ -461,9 +463,11 @@ def install_dylib(args, library_name, install_dir, module_names):
461
463
# Helper function that installs a single built artifact to a particular directory. The source may be either a file or a directory.
462
464
def install_binary (args , binary , destination , destination_is_directory = True , ignored_patterns = []):
463
465
src = os .path .join (args .bin_dir , binary )
466
+ install_file (args , src , destination , destination_is_directory = destination_is_directory , ignored_patterns = ignored_patterns )
464
467
468
+ def install_file (args , src , destination , destination_is_directory = True , ignored_patterns = []):
465
469
if destination_is_directory :
466
- dest = os .path .join (destination , binary )
470
+ dest = os .path .join (destination , os . path . basename ( src ) )
467
471
mkdir_p (os .path .dirname (dest ))
468
472
else :
469
473
dest = destination
0 commit comments