Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Also look in the next-highest directory when detecting VCS; add SVN
  • Loading branch information
David Christensen committed Dec 7, 2017
1 parent b459d6e commit da07bbc
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Makefile.PL
Expand Up @@ -457,7 +457,7 @@ EOF

# install share/ files from MANIFEST
chomp(my @sharefiles = grep m:^share/:, @files);
$HaveSCCS = (-d "$realdir/.git" or -d "$realdir/CVS" or -d "$realdir/RCS") ? 1 : 0;
$HaveSCCS = detect_vcs($realdir);
install_file('.', $realdir, $_) for @sharefiles;
# install code/ files from MANIFEST
chomp(my @codefiles = grep m:^code/:, @files);
Expand Down Expand Up @@ -718,6 +718,15 @@ EOF
return \%X;
}

sub detect_vcs {
my $realdir = shift;

for my $dir ( qw(.git .svn CVS RCS) ) {
return 1 if -d "$realdir/$_" or -d "$realdir/../$_";
}
return 0;
}

sub get_dist_version {
my $vers = $VERSION;
my $is_stable;
Expand Down

0 comments on commit da07bbc

Please sign in to comment.