diff options
author | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 22:23:19 +0000 |
---|---|---|
committer | scherkus@chromium.org <scherkus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-28 22:23:19 +0000 |
commit | 6bb3802bc57ed237137e4880b42edbdd23ce3440 (patch) | |
tree | 812b51a7f807f886cd7dfb4631dc8936fb390e98 /tools/checkbins | |
parent | f3ab3a456108a4f6ad9ebe3abc9ddae3d568ced9 (diff) | |
download | chromium_src-6bb3802bc57ed237137e4880b42edbdd23ce3440.zip chromium_src-6bb3802bc57ed237137e4880b42edbdd23ce3440.tar.gz chromium_src-6bb3802bc57ed237137e4880b42edbdd23ce3440.tar.bz2 |
Fix checkbins.py to find pefile import instead of .bat/.sh wrappers.
BUG=25952
TEST=still executes regardless of where you run the script from
Review URL: http://codereview.chromium.org/347008
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@30396 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/checkbins')
-rwxr-xr-x | tools/checkbins/checkbins.bat | 5 | ||||
-rwxr-xr-x | tools/checkbins/checkbins.py | 3 | ||||
-rwxr-xr-x | tools/checkbins/checkbins.sh | 9 |
3 files changed, 4 insertions, 13 deletions
diff --git a/tools/checkbins/checkbins.bat b/tools/checkbins/checkbins.bat index 8e7c001..d7debd1 100755 --- a/tools/checkbins/checkbins.bat +++ b/tools/checkbins/checkbins.bat @@ -1,4 +1 @@ -@echo off -setlocal -set PYTHONPATH=%~dp0..\..\third_party\pefile;%PYTHONPATH% -%~dp0..\..\third_party\python_24\python.exe %~dp0checkbins.py %* +@%~dp0..\..\third_party\python_24\python.exe %~dp0checkbins.py %* diff --git a/tools/checkbins/checkbins.py b/tools/checkbins/checkbins.py index 318720e..a662a02 100755 --- a/tools/checkbins/checkbins.py +++ b/tools/checkbins/checkbins.py @@ -14,6 +14,9 @@ import os import optparse import sys +# Find /third_party/pefile based on current directory and script path. +sys.path.append(os.path.join(os.path.dirname(__file__), '..', '..', + 'third_party', 'pefile')) import pefile PE_FILE_EXTENSIONS = ['.exe', '.dll'] diff --git a/tools/checkbins/checkbins.sh b/tools/checkbins/checkbins.sh deleted file mode 100755 index e0e3bd1..0000000 --- a/tools/checkbins/checkbins.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# Copyright (c) 2009 The Chromium Authors. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -# Include pefile in the path. -PYTHONPATH="$(dirname $0)/../../third_party/pefile:$PYTHONPATH" -export PYTHONPATH -python "$(dirname $0)/checkbins.py" "$@" |