From 7cf9586ca965cbc31373fcb473659cfec6178945 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Br=C3=BCning?= Date: Tue, 15 Jul 2014 18:26:04 +0200 Subject: Fix init-repository to also work on Windows. This creates a requirement to have pscp / PuTTY installed when wanting to initialize the upstream repositories on Windows. Change-Id: I404de5d45c70fd950a284a86403ca47c64826392 Reviewed-by: Andras Becsi --- init-repository.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'init-repository.py') diff --git a/init-repository.py b/init-repository.py index fa2ef5661..123894814 100755 --- a/init-repository.py +++ b/init-repository.py @@ -128,7 +128,10 @@ def addGerritRemote(): def installGitHooks(): os.chdir(qtwebengine_root) - subprocess.call(['scp', '-p', '-P', '29418', 'codereview.qt-project.org:hooks/commit-msg', '.git/hooks']) + if sys.platform == 'win32': + subprocess.call(['pscp', '-p', '-P', '29418', 'codereview.qt-project.org:hooks/commit-msg', '.git/hooks']) + else: + subprocess.call(['scp', '-p', '-P', '29418', 'codereview.qt-project.org:hooks/commit-msg', '.git/hooks']) def initUpstreamSubmodules(): ninja_url = 'https://github.com/martine/ninja.git' @@ -183,6 +186,6 @@ if args.upstream: initUpstreamSubmodules() updateLastChange() if not args.baseline_upstream and not use_external_chromium: - subprocess.call([os.path.join(qtwebengine_root, 'tools', 'scripts', 'patch_upstream.py')]) + subprocess.call(['python', os.path.join(qtwebengine_root, 'tools', 'scripts', 'patch_upstream.py')]) if args.snapshot: initSnapshot() -- cgit v1.2.3