A git extension for running post-sync hooks.
[email protected]
Review URL: https://codereview.chromium.org/11362025
git-svn-id: svn://svn.chromium.org/chrome/trunk/tools/depot_tools@165295 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/git-runhooks b/git-runhooks
new file mode 100644
index 0000000..49fe946
--- /dev/null
+++ b/git-runhooks
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+while test "$PWD" != "/"; do
+ if test -f "$PWD/src/.gitmodules"; then
+ break
+ fi
+ cd ..
+done
+if ! test -f "$PWD/src/.gitmodules"; then
+ echo "Could not find the root of your checkout; aborting." 1>&2
+ exit 1
+fi
+
+gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
+gclient runhooks --spec="$gclient_spec"
+exit $?