Mailing List Archive

[interchange] Also look in the next-highest directory when detecting VCS; add SVN
commit da07bbc37a7d92851c7ffa597313c383653e108e
Author: David Christensen <david@endpoint.com>
Date: Thu Dec 7 11:05:13 2017 -0600

Also look in the next-highest directory when detecting VCS; add SVN

Makefile.PL | 11 ++++++++++-
1 files changed, 10 insertions(+), 1 deletions(-)
---
diff --git a/Makefile.PL b/Makefile.PL
index 81d513a..4a9181d 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -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);
@@ -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;

_______________________________________________
interchange-cvs mailing list
interchange-cvs@icdevgroup.org
http://www.icdevgroup.org/mailman/listinfo/interchange-cvs