diff options
author | Pierre Rossi <pierre.rossi@digia.com> | 2013-06-19 11:29:33 +0200 |
---|---|---|
committer | Pierre Rossi <pierre.rossi@digia.com> | 2013-06-19 11:29:33 +0200 |
commit | 7ce5fb981bc11d26c060d88ceb018e5adaf0e7be (patch) | |
tree | d07e8c8523f52ce1f9289179078d9763fd2dae3c /patches/patch-chromium.sh | |
parent | 37c1d5d3a7a8cf1e0f6f9f4c6d40bb6854739110 (diff) |
better gclient detection in the patch script
Diffstat (limited to 'patches/patch-chromium.sh')
-rwxr-xr-x | patches/patch-chromium.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/patches/patch-chromium.sh b/patches/patch-chromium.sh index 102e51d44..23b9db8ff 100755 --- a/patches/patch-chromium.sh +++ b/patches/patch-chromium.sh @@ -7,16 +7,25 @@ if [ -z $CHROMIUM_SRC_DIR -o ! -d $CHROMIUM_SRC_DIR ]; then fi PATCH_DIR="$( cd "$( dirname "$0" )" && pwd )" -DEPOT_TOOLS=$CHROMIUM_SRC_DIR/../depot_tools cd $CHROMIUM_SRC_DIR echo "Entering $PWD" -$DEPOT_TOOLS/gclient revert +GCLIENT=`which gclient 2>/dev/null` +if [ -z $GCLIENT ]; then + # Try to find it in the most likely location + GCLIENT=$CHROMIUM_SRC_DIR/../depot_tools/gclient + if [ ! -e $GCLIENT ]; then + echo "Can't find gclient" + exit 2; + fi +fi + +$GCLIENT revert if [ "$2" = "--update" ]; then - $DEPOT_TOOLS/gclient fetch - $DEPOT_TOOLS/gclient sync + $GCLIENT fetch + $GCLIENT sync fi echo "Applying patches..." |