diff options
Diffstat (limited to 'WebKitTools/Scripts/update-webkit-chromium')
-rwxr-xr-x | WebKitTools/Scripts/update-webkit-chromium | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/WebKitTools/Scripts/update-webkit-chromium b/WebKitTools/Scripts/update-webkit-chromium index 779b9a6..fa94f8c 100755 --- a/WebKitTools/Scripts/update-webkit-chromium +++ b/WebKitTools/Scripts/update-webkit-chromium @@ -28,24 +28,28 @@ # Update script for the WebKit Chromium Port. -# Check if gclient is installed. -if (not `gclient --version`) { - print STDERR "gclient is required for updating chromium dependencies.\n"; - print STDERR "Install depot_tools and add gclient to the environment\n"; - print STDERR "path. For more information, refer to:\n"; - print STDERR "http://dev.chromium.org/developers/how-tos/install-gclient\n"; - die; +chdir("WebKit/chromium") or die $!; + +# Find gclient or install it. +my $gclientPath; +if (`gclient --version`) { + $gclientPath = 'gclient'; +} elsif (-e 'depot_tools/gclient') { + $gclientPath = 'depot_tools/gclient'; +} else { + print "Installing chromium's depot_tools...\n"; + system("svn co http://src.chromium.org/svn/trunk/tools/depot_tools") == 0 or die $1; + $gclientPath = 'depot_tools/gclient'; } -chdir("WebKit/chromium") or die $!; if (! -e ".gclient") { # If .gclient configuration file doesn't exist, create it. print "Configuring gclient...\n"; - system("gclient", + system($gclientPath, "config", "--spec=solutions=[{'name':'./','url':None}]") == 0 or die $!; } # Execute gclient sync. print "Updating chromium port dependencies using gclient...\n"; -system("gclient", "sync", "--force") == 0 or die $!; +system($gclientPath, "sync", "--force") == 0 or die $!; |