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