Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: git-runhooks

Issue 197213008: Invoke the bash shell via /usr/bin/env so that these scripts run on operating systems without /bin/… (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/depot_tools.git@master
Patch Set: Use "/usr/bin/env bash" for these files too. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « git-reparent-branch ('k') | git-squash-branch » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/bash 1 #!/usr/bin/env bash
2 2
3 while test "$PWD" != "/"; do 3 while test "$PWD" != "/"; do
4 if test -f "$PWD/src/.gitmodules"; then 4 if test -f "$PWD/src/.gitmodules"; then
5 break 5 break
6 fi 6 fi
7 cd .. 7 cd ..
8 done 8 done
9 if ! test -f "$PWD/src/.gitmodules"; then 9 if ! test -f "$PWD/src/.gitmodules"; then
10 echo "Could not find the root of your checkout; aborting." 1>&2 10 echo "Could not find the root of your checkout; aborting." 1>&2
11 exit 1 11 exit 1
12 fi 12 fi
13 13
14 gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]" 14 gclient_spec="solutions=[{'name':'src','url':None,'deps_file':'.DEPS.git'}]"
15 kernel_name=$(uname -s) 15 kernel_name=$(uname -s)
16 if [ "${kernel_name:0:5}" = "MINGW" ]; then 16 if [ "${kernel_name:0:5}" = "MINGW" ]; then
17 dir="${0%\\*}" 17 dir="${0%\\*}"
18 cmd "/C ${dir}\\python.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec" 18 cmd "/C ${dir}\\python.bat ${dir}\\gclient.py runhooks --spec=$gclient_spec"
19 else 19 else
20 dir="$(dirname $0)" 20 dir="$(dirname $0)"
21 PYTHONDONTWRITEBYTECODE=1 exec python "$dir/gclient.py" runhooks --spec="$gcli ent_spec" 21 PYTHONDONTWRITEBYTECODE=1 exec python "$dir/gclient.py" runhooks --spec="$gcli ent_spec"
22 fi 22 fi
23 exit $? 23 exit $?
OLDNEW
« no previous file with comments | « git-reparent-branch ('k') | git-squash-branch » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698