mirror of
https://github.com/moparisthebest/curl
synced 2024-11-16 06:25:03 -05:00
changed the git update block to take care of c-ares repo if detected.
This commit is contained in:
parent
a8f85e778f
commit
6ab2cae55e
@ -72,7 +72,7 @@ use vars qw($name $email $desc $confopts $runtestopts $setupfile $mktarball
|
|||||||
$timestamp);
|
$timestamp);
|
||||||
|
|
||||||
# version of this script
|
# version of this script
|
||||||
$version='2010-04-12';
|
$version='2010-04-13';
|
||||||
$fixed=0;
|
$fixed=0;
|
||||||
|
|
||||||
# Determine if we're running from git or a canned copy of curl,
|
# Determine if we're running from git or a canned copy of curl,
|
||||||
@ -375,33 +375,28 @@ if (-d $build) {
|
|||||||
# get in the curl source tree root
|
# get in the curl source tree root
|
||||||
chdir $CURLDIR;
|
chdir $CURLDIR;
|
||||||
|
|
||||||
sub gitpull() {
|
|
||||||
# update quietly to the latest git
|
|
||||||
if($nogitpull) {
|
|
||||||
logit "skipping git pull (--nogitpull)";
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
logit "run git pull";
|
|
||||||
system("git pull 2>&1");
|
|
||||||
return $?;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Do the git thing, or not...
|
# Do the git thing, or not...
|
||||||
if ($git) {
|
if ($git) {
|
||||||
|
# update quietly to the latest git
|
||||||
my $cvsstat = gitpull();
|
if($nogitpull) {
|
||||||
|
logit "skipping git pull (--nogitpull)";
|
||||||
if ($cvsstat != 0) {
|
} else {
|
||||||
# update failure is not lethal
|
my $gitstat = 0;
|
||||||
logit "failed to update from git ($cvsstat), continue anyway";
|
logit "run git pull in curl";
|
||||||
}
|
system("git pull 2>&1");
|
||||||
elsif (!$nogitpull) {
|
$gitstat += $?;
|
||||||
|
logit "failed to update from curl git ($?), continue anyway" if ($?);
|
||||||
|
if (-d "$CURLDIR/ares/.git") {
|
||||||
|
chdir "$CURLDIR/ares";
|
||||||
|
logit "run git pull in ares";
|
||||||
|
system("git pull 2>&1");
|
||||||
|
$gitstat += $?;
|
||||||
|
logit "failed to update from ares git ($?), continue anyway" if ($?);
|
||||||
|
chdir $CURLDIR;
|
||||||
|
}
|
||||||
# Set timestamp to the UTC the git update took place.
|
# Set timestamp to the UTC the git update took place.
|
||||||
$timestamp = scalar(gmtime)." UTC";
|
$timestamp = scalar(gmtime)." UTC" if (!$gitstat);
|
||||||
}
|
}
|
||||||
|
|
||||||
# get the last 5 commits for show (even if no pull was made)
|
# get the last 5 commits for show (even if no pull was made)
|
||||||
my @commits=`git log --pretty=oneline --abbrev-commit -5`;
|
my @commits=`git log --pretty=oneline --abbrev-commit -5`;
|
||||||
logit "The most recent git commits:";
|
logit "The most recent git commits:";
|
||||||
@ -411,7 +406,7 @@ if ($git) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if($nobuildconf) {
|
if($nobuildconf) {
|
||||||
logit "told to not run buildconf";
|
logit "told to not run buildconf";
|
||||||
}
|
}
|
||||||
elsif ($configurebuild) {
|
elsif ($configurebuild) {
|
||||||
# remove possible left-overs from the past
|
# remove possible left-overs from the past
|
||||||
|
Loading…
Reference in New Issue
Block a user