summaryrefslogtreecommitdiffstats
path: root/patches/patch-chromium.sh
diff options
context:
space:
mode:
authorPierre Rossi <pierre.rossi@digia.com>2013-06-19 11:29:33 +0200
committerPierre Rossi <pierre.rossi@digia.com>2013-06-19 11:29:33 +0200
commit7ce5fb981bc11d26c060d88ceb018e5adaf0e7be (patch)
treed07e8c8523f52ce1f9289179078d9763fd2dae3c /patches/patch-chromium.sh
parent37c1d5d3a7a8cf1e0f6f9f4c6d40bb6854739110 (diff)
better gclient detection in the patch script
Diffstat (limited to 'patches/patch-chromium.sh')
-rwxr-xr-xpatches/patch-chromium.sh17
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..."