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:
authorCampbell Barton <ideasman42@gmail.com>2011-10-16 15:09:15 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-10-16 15:09:15 +0400
commit92bc72dca19ae50a8e1a36734a7280e10f8e352e (patch)
tree13dfa4fdaead8c1ea679d9e3ccb226360dd7ad79 /doc/manpage/blender.1.py
parent3fd8a914b84ff6e1e0c9e313d0a48cd3438e0b08 (diff)
convenience targets for make doc_py, doc_dna, doc_man
Diffstat (limited to 'doc/manpage/blender.1.py')
-rw-r--r--doc/manpage/blender.1.py12
1 files changed, 9 insertions, 3 deletions
diff --git a/doc/manpage/blender.1.py b/doc/manpage/blender.1.py
index 40234300994..21df42a4082 100644
--- a/doc/manpage/blender.1.py
+++ b/doc/manpage/blender.1.py
@@ -22,6 +22,7 @@
import subprocess
import os
+import sys
import time
import datetime
@@ -43,10 +44,15 @@ def man_format(data):
return data
+# allow passing blender as argument
+if sys.argv[-1].endswith(os.sep + "blender"):
+ blender_bin = sys.argv[-1]
+else:
+ blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
-blender_bin = os.path.join(os.path.dirname(__file__), "../../blender.bin")
-
-blender_help = subprocess.Popen([blender_bin, "--help"], stdout=subprocess.PIPE).communicate()[0].decode()
+cmd = [blender_bin, "--help"]
+print(" executing:", " ".join(cmd))
+blender_help = subprocess.Popen(cmd, stdout=subprocess.PIPE).communicate()[0].decode()
blender_version = subprocess.Popen([blender_bin, "--version"], stdout=subprocess.PIPE).communicate()[0].decode().strip()
blender_version = blender_version.split("Build")[0]