diff options
author | Andras Becsi <andras.becsi@digia.com> | 2014-09-10 20:00:44 +0200 |
---|---|---|
committer | Andras Becsi <andras.becsi@digia.com> | 2014-09-11 12:22:49 +0200 |
commit | de2d1a6d8ab61db7e6994c414a08f1a6ba7afb9b (patch) | |
tree | 9c74163e4c23c9c44bb07e80d9512f1c37857576 /tools/scripts | |
parent | 2b8b78d04a722b28a103ed1c6a63550c3e45244d (diff) |
take_snapshot: check if dos2unix is in the path before using it
Change-Id: If696de316dd7b3b801ba46d1a54c37eafa901bf1
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Diffstat (limited to 'tools/scripts')
-rwxr-xr-x | tools/scripts/take_snapshot.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/scripts/take_snapshot.py b/tools/scripts/take_snapshot.py index c08887e12..3696b9a7a 100755 --- a/tools/scripts/take_snapshot.py +++ b/tools/scripts/take_snapshot.py @@ -296,8 +296,12 @@ def exportChromium(): copyFile(f, os.path.join(third_party_chromium, f)) print("") -dos2unixVersion = StrictVersion(subprocess.Popen(['dos2unix', '-V'], stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[1]) -if dos2unixVersion < StrictVersion('6.0.6'): +commandNotFound = subprocess.call(['which', 'dos2unix']) + +if not commandNotFound: + dos2unixVersion = StrictVersion(subprocess.Popen(['dos2unix', '-V', '| true'], stdout=subprocess.PIPE).communicate()[0].splitlines()[0].split()[1]) + +if commandNotFound or dos2unixVersion < StrictVersion('6.0.6'): raise Exception("You need dos2unix version 6.0.6 minimum.") clearDirectory(third_party) |