Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-31 19:43:31 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-08-31 19:52:28 +0300
commitebafb46e4ad0756e49e3e98031c2652390aa7378 (patch)
tree088ee30a4871bff7b0e495d36dabf0c64d9951ae /build_files/utils
parent505340202e960776f694ccfc7ed2c959c38a02c1 (diff)
Build: don't require svn to be available for "make update" when not used
Specifically on Linux, when not having a tests checkout.
Diffstat (limited to 'build_files/utils')
-rwxr-xr-xbuild_files/utils/make_update.py20
1 files changed, 12 insertions, 8 deletions
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"])