Index: git-runhooks |
diff --git a/git-runhooks b/git-runhooks |
index 49fe9462d5854a77714b6f31b95c6c246019270a..35af2eaa424044073d6aacef1aa8d353529a6546 100755 |
--- a/git-runhooks |
+++ b/git-runhooks |
@@ -12,5 +12,12 @@ if ! test -f "$PWD/src/.gitmodules"; then |
fi |
gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]" |
-gclient runhooks --spec="$gclient_spec" |
+kernel_name=$(uname -s) |
+if [ "${kernel_name:0:5}" = "MINGW" ]; then |
+ dir="${0%\\*}" |
iannucci
2013/03/19 20:29:24
why not dirname? Is it not available?
szager1
2013/03/19 20:31:38
dirname is hard-coded to look for '/', but $0 will
|
+ cmd "/C ${dir}\\python.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec" |
+else |
+ dir="$(dirname $0)" |
+ PYTHONDONTWRITEBYTECODE=1 exec python "$dir/gclient.py" runhooks --spec="$gclient_spec" |
+fi |
exit $? |