summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoridl0r <idl0r@gentoo.org>2009-04-30 15:06:15 +0000
committeridl0r <idl0r@gentoo.org>2009-04-30 15:06:15 +0000
commitb10d16ccc01bd002b01fa1a2b77f973f54f37961 (patch)
treeb056b9f1ef0a4c9b1214a84c63907cbda9f08c35
parentAdd patch from loki_val to check -l dependencies in .la files (Bug #267898) (diff)
downloadgentoolkit-b10d16ccc01bd002b01fa1a2b77f973f54f37961.tar.gz
gentoolkit-b10d16ccc01bd002b01fa1a2b77f973f54f37961.tar.bz2
gentoolkit-b10d16ccc01bd002b01fa1a2b77f973f54f37961.zip
Fixed git detection.
svn path=/; revision=556
-rwxr-xr-xtrunk/src/echangelog/echangelog13
1 files changed, 9 insertions, 4 deletions
diff --git a/trunk/src/echangelog/echangelog b/trunk/src/echangelog/echangelog
index 4b1f786..fea1af6 100755
--- a/trunk/src/echangelog/echangelog
+++ b/trunk/src/echangelog/echangelog
@@ -90,11 +90,16 @@ if ( -d "CVS" ) {
$vcs = "cvs";
} elsif ( -d '.svn' ) {
$vcs = "svn";
-} elsif ( -f '/usr/bin/git' and open GIT, "git rev-parse --git-dir |" ) {
- $vcs = "git";
- close GIT;
} else {
- die "No CVS, .git, .svn directories found, what kind of repo is this?";
+ if ( -x '/usr/bin/git' ) {
+ open(GIT, '-|', "git rev-parse --git-dir 2>/dev/null");
+ $vcs = "git" if defined(<GIT>);
+ close(GIT);
+ }
+
+ if ( ! $vcs ) {
+ die "No CVS, .git, .svn directories found, what kind of repo is this?";
+ }
}
# Read the current ChangeLog