Changeset 2305 in ProjectBuilder for devel/pb-modules/lib/ProjectBuilder/VCS.pm
- Timestamp:
- Sep 6, 2017, 7:36:28 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
devel/pb-modules/lib/ProjectBuilder/VCS.pm
r2284 r2305 694 694 pb_log(1,"pb_vcs_compliant useless\n"); 695 695 return; 696 } elsif (defined $pbinit) { 697 pb_mkdir_p("$ENV{$envar}"); 698 } elsif (! -d "$ENV{$envar}") { 696 } elsif ((defined $pbinit) || (! -d "$ENV{$envar}")) { 697 my $exportdir = $ENV{$envar}; 699 698 # Either we have a version in the uri, and it should be the same 700 699 # as the one in the envar. Or we should add the version to the uri 701 700 # But not if it's git as it manages version branches internally 702 if ((basename($uri) ne basename($ENV{$envar})) && ($scheme !~ /^git/)) { 703 $uri .= "/".basename($ENV{$envar}) 701 if ((basename($uri) ne basename($exportdir)) && ($scheme !~ /git/)) { 702 $uri .= "/".basename($exportdir); 703 } 704 if ((defined $pbinit) && ($scheme =~ /git/)) { 705 # If initializing remove the potential pbconf part if we treat pbconfdir 706 $exportdir =~ s|pbconf[/]*||; 704 707 } 705 708 pb_log(1,"Checking out $uri\n"); 706 709 # Create structure and remove end dir before exporting 707 pb_mkdir_p("$ENV{$envar}"); 708 pb_rm_rf($ENV{$envar}); 709 pb_vcs_checkout($scheme,$uri,$ENV{$envar}); 710 pb_mkdir_p("$exportdir"); 711 pb_rm_rf($exportdir); 712 pb_vcs_checkout($scheme,$uri,$exportdir); 713 if ((defined $pbinit) && ($scheme =~ /git/)) { 714 # And now created the potentially missin gpbconf dir 715 pb_mkdir_p("$exportdir/pbconf"); 716 } 710 717 } else { 711 718 pb_log(1,"$uri found locally, checking content\n");
Note:
See TracChangeset
for help on using the changeset viewer.