Changeset 89afd9ca662c…
Parent 9f73cf858877…
by
Changes to one file · Browse files at 89afd9ca662c Showing diff from parent 9f73cf858877 Diff from another changeset...
@@ -8,6 +8,7 @@ import subprocess
import plistlib
import re
+import getopt
print sys.prefix
qtplugindir = '/Developer/Applications/Qt/plugins/imageformats'
@@ -19,6 +20,9 @@
installenv = os.environ
+# default to TortoiseHg stable build config
+branch = 'stable'
+
def run(cmd, cwd='.', hide=False, env=installenv):
if not hide:
print cwd + ">" + cmd
@@ -35,17 +39,29 @@ run(cmd, cwd, hide, env)
def checkrepo(name, ver=''):
- if os.path.isdir(name):
- return
- run(r'hg clone -U %s file:%s' % (URL[name], name))
- run(r'hg update -R %s %s' % (name, ver))
+ if not os.path.isdir(name):
+ run(r'hg clone -U %s file:%s' % (URL[name], name))
+ run(r'hg update -C -R %s %s' % (name, ver))
def copywithperms(src, dest):
shutil.copyfile(src, dest)
shutil.copymode(src, dest)
-checkrepo('hg')
-checkrepo('thg')
+try:
+ opts, args = getopt.getopt(sys.argv[1:], 'h',
+ ['thg-stable', 'thg-unstable', 'help'])
+except getopt.error, msg:
+ pass
+
+# parse options
+for opt, arg in opts:
+ if opt == '--thg-stable':
+ branch = 'stable'
+ elif opt == '--thg-unstable':
+ branch = 'default'
+
+checkrepo('hg', branch)
+checkrepo('thg', branch)
print 'Copying QT plugins from %s' % qtplugindir
shutil.rmtree('dist/TortoiseHg.app', ignore_errors=True)
|
Loading...