Changeset 2169 in ProjectBuilder for devel/pb-modules


Ignore:
Timestamp:
Jan 5, 2017, 2:52:50 AM (7 years ago)
Author:
Bruno Cornec
Message:

Fix #152 by adding support for https scheme in URLs !!

Location:
devel/pb-modules/lib/ProjectBuilder
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • devel/pb-modules/lib/ProjectBuilder/Distribution.pm

    r2161 r2169  
    584584
    585585    # The repo file can be local or remote. download or copy at the right place
    586     if (($scheme eq "ftp") || ($scheme eq "http")) {
     586    if (($scheme eq "ftp") || ($scheme =~ /http/)) {
    587587        pb_system("wget -O $ENV{'PBTMP'}/$bn $i","Downloading additional repository file $i");
    588588    } else {
  • devel/pb-modules/lib/ProjectBuilder/VCS.pm

    r2086 r2169  
    117117} elsif ($scheme eq "dir") {
    118118    pb_system("cp -r $path $destdir","Copying $uri from DIR to $destdir ");
    119 } elsif (($scheme eq "http") || ($scheme eq "ftp")) {
     119} elsif (($scheme =~ /http/) || ($scheme eq "ftp")) {
    120120    my $f = basename($path);
    121121    unlink "$ENV{'PBTMP'}/$f";
     
    377377    $newurl = pb_vcs_mod_htftp($newurl,"svn");
    378378    pb_system("$vcscmd copy -m \"Creation of $newurl from $oldurl\" $oldurl $newurl","Copying $oldurl to $newurl ");
    379 } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     379} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    380380    # Nothing to do.
    381381} else {
     
    412412    $url = pb_vcs_mod_htftp($url,"git");
    413413    pb_system("$vcscmd clone $url $destination","Checking out $url to $destination ");
    414 } elsif (($scheme eq "ftp") || ($scheme eq "http")) {
     414} elsif (($scheme eq "ftp") || ($scheme =~ /http/)) {
    415415    return;
    416416} elsif ($scheme =~ /^cvs/) {
     
    456456        pb_system("(cd $d && $vcscmd fetch)", "Updating $d ");
    457457    }
    458 } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     458} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    459459    # Nothing to do.
    460460} else {
     
    482482} elsif ($scheme =~ /^git/) {
    483483    pb_system("cd $dir && $vcscmd commit -a -m \"$msg\"", "Checking in $dir ");
    484 } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     484} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    485485    # Nothing to do.
    486486} else {
     
    508508        pb_vcs_add($scheme,$f) if ($uri !~ /^$scheme/);
    509509    }
    510 } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     510} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    511511    # Nothing to do.
    512512} else {
     
    530530if ($scheme =~ /^((hg)|(git)|(svn)|(svk)|(cvs))/o) {
    531531    pb_system("$vcscmd add ".join(' ',@f),"Adding ".join(' ',@f)." to VCS ");
    532 } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     532} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    533533    # Nothing to do.
    534534} else {
     
    560560        $l++;
    561561    }
    562 } elsif ($scheme =~ /^(flat)|(ftp)|(http)|(file)\b/o) {
     562} elsif ($scheme =~ /^(flat)|(ftp)|(http)|(https)|(file)\b/o) {
    563563    $l = 0;
    564564} else {
Note: See TracChangeset for help on using the changeset viewer.