From ebafb46e4ad0756e49e3e98031c2652390aa7378 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Sat, 31 Aug 2019 18:43:31 +0200 Subject: Build: don't require svn to be available for "make update" when not used Specifically on Linux, when not having a tests checkout. --- build_files/utils/make_update.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'build_files/utils') diff --git a/build_files/utils/make_update.py b/build_files/utils/make_update.py index 1bd8d383284..85fff2ba606 100755 --- a/build_files/utils/make_update.py +++ b/build_files/utils/make_update.py @@ -29,14 +29,6 @@ git_command = args.git_command svn_command = args.svn_command svn_non_interactive = [args.svn_command, '--non-interactive'] -if shutil.which(git_command) is None: - sys.stderr.write("git not found, can't update code\n") - sys.exit(1) - -if shutil.which(svn_command) is None: - sys.stderr.write("svn not found, can't update libraries\n") - sys.exit(1) - def print_stage(text): print("") print(text) @@ -68,6 +60,10 @@ if not only_code: if not os.path.exists(lib_platform_dirpath): print_stage("Checking out Precompiled Libraries") + if shutil.which(svn_command) is None: + sys.stderr.write("svn not found, can't checkout libraries\n") + sys.exit(1) + svn_url_platform = svn_url + lib_platform call(svn_non_interactive + ["checkout", svn_url_platform, lib_platform_dirpath]) @@ -85,6 +81,10 @@ if not only_code: if os.path.isdir(dirpath) and \ (os.path.exists(svn_dirpath) or os.path.exists(svn_root_dirpath)): + if shutil.which(svn_command) is None: + sys.stderr.write("svn not found, can't update libraries\n") + sys.exit(1) + call(svn_non_interactive + ["cleanup", dirpath]) call(svn_non_interactive + ["switch", svn_url + dirname, dirpath]) call(svn_non_interactive + ["update", dirpath]) @@ -92,6 +92,10 @@ if not only_code: # Update blender repository and submodules. print_stage("Updating Blender Git Repository and Submodules") +if shutil.which(git_command) is None: + sys.stderr.write("git not found, can't update code\n") + sys.exit(1) + call([git_command, "pull", "--rebase"]) call([git_command, "submodule", "update", "--init", "--recursive"]) -- cgit v1.2.3