diff options
Diffstat (limited to 'WebKitTools/Scripts/update-webkit')
-rwxr-xr-x | WebKitTools/Scripts/update-webkit | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/WebKitTools/Scripts/update-webkit b/WebKitTools/Scripts/update-webkit index b503004..7602c41 100755 --- a/WebKitTools/Scripts/update-webkit +++ b/WebKitTools/Scripts/update-webkit @@ -39,6 +39,7 @@ use VCSUtils; use webkitdirs; sub runSvnUpdate(); +sub runGitUpdate(); # Handle options my $quiet = ''; @@ -46,6 +47,11 @@ my $showHelp; determineIsChromium(); +chdirWebKit(); + +my $isGit = isGit(); +my $isSVN = isSVN(); + my $getOptionsResult = GetOptions( 'h|help' => \$showHelp, 'q|quiet' => \$quiet, @@ -67,20 +73,23 @@ push @svnOptions, '-q' if $quiet; # Don't prompt when using svn-1.6 or newer. push @svnOptions, qw(--accept postpone) if isSVNVersion16OrNewer(); -chdirWebKit(); print "Updating OpenSource\n" unless $quiet; -runSvnUpdate(); +runSvnUpdate() if $isSVN; +runGitUpdate() if $isGit; if (-d "../Internal") { chdir("../Internal"); print "Updating Internal\n" unless $quiet; - runSvnUpdate(); + runSvnUpdate() if $isSVN; + runGitUpdate() if $isGit; } elsif (isChromium()) { system("perl", "WebKitTools/Scripts/update-webkit-chromium") == 0 or die $!; } elsif (isAppleWinWebKit()) { system("perl", "WebKitTools/Scripts/update-webkit-auxiliary-libs") == 0 or die; } +setupAppleWinEnv() if isAppleWinWebKit(); + exit 0; sub runSvnUpdate() @@ -104,3 +113,8 @@ sub runSvnUpdate() or die "Could not open resolve-ChangeLogs script: $!.\n"; } } + +sub runGitUpdate() +{ + system("git", "svn", "rebase") == 0 or die; +} |