git-runhooks 612 B

1234567891011121314151617181920212223
  1. #!/usr/bin/env bash
  2. while test "$PWD" != "/"; do
  3. if test -f "$PWD/src/.gitmodules"; then
  4. break
  5. fi
  6. cd ..
  7. done
  8. if ! test -f "$PWD/src/.gitmodules"; then
  9. echo "Could not find the root of your checkout; aborting." 1>&2
  10. exit 1
  11. fi
  12. gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
  13. kernel_name=$(uname -s)
  14. if [ "${kernel_name:0:5}" = "MINGW" ]; then
  15. dir="${0%\\*}"
  16. cmd "/C ${dir}\\python3.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec"
  17. else
  18. dir="$(dirname $0)"
  19. PYTHONDONTWRITEBYTECODE=1 exec python3 "$dir/gclient.py" runhooks --spec="$gclient_spec"
  20. fi
  21. exit $?