From 3113c03020f8d80bf35ceb5e01cf7f93c5bf71a6 Mon Sep 17 00:00:00 2001 From: Relintai Date: Sun, 24 Nov 2019 17:00:16 +0100 Subject: [PATCH] Fix target folder issue with the new engine setup script. --- SConstruct | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/SConstruct b/SConstruct index ee33fd59..dc0b0fc6 100644 --- a/SConstruct +++ b/SConstruct @@ -27,7 +27,7 @@ module_repositories = [ ] addon_repositories = [ - ['https://github.com/Relintai/entity-spell-system-addons.git', 'entity-spell-system-addons', '/addons' ], + ['https://github.com/Relintai/entity-spell-system-addons.git', 'entity-spell-system-addons', 'addons' ], ] third_party_addon_repositories = [ @@ -95,6 +95,9 @@ def setup_repository(data, clone_path): os.chdir(cwd) def copy_repository(data, target_folder, clone_path): + copytree(os.path.abspath(clone_path + data[1] + '/' + data[2]), os.path.abspath(target_folder + data[1])) + +def copy_addon_repository(data, target_folder, clone_path): copytree(os.path.abspath(clone_path + data[1] + '/' + data[2]), os.path.abspath(target_folder)) def copytree(src, dst): @@ -121,12 +124,12 @@ def update_modules(): def update_addons(): for rep in addon_repositories: update_repository(rep, module_clone_path) - copy_repository(rep, './game/addons/', '.' + module_clone_path) + copy_addon_repository(rep, './game/addons/', '.' + module_clone_path) def update_addons_third_party_addons(): for rep in third_party_addon_repositories: update_repository(rep, module_clone_path) - copy_repository(rep, './game/addons/', '.' + module_clone_path) + copy_addon_repository(rep, './game/addons/', '.' + module_clone_path) def update_all(): update_engine() @@ -148,12 +151,12 @@ def setup_modules(): def setup_addons(): for rep in addon_repositories: setup_repository(rep, module_clone_path) - copy_repository(rep, './game/addons/', '.' + module_clone_path) + copy_addon_repository(rep, './game/addons/', '.' + module_clone_path) def setup_addons_third_party_addons(): for rep in third_party_addon_repositories: setup_repository(rep, module_clone_path) - copy_repository(rep, './game/addons/', '.' + module_clone_path) + copy_addon_repository(rep, './game/addons/', '.' + module_clone_path) def setup_all(): load_target_commits_array()