diff options
author | ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-01 04:19:59 +0000 |
---|---|---|
committer | ygribov <ygribov@138bc75d-0d04-0410-961f-82ee72b054a4> | 2014-08-01 04:19:59 +0000 |
commit | 345bab5914890d673753554ac80618521ff432e1 (patch) | |
tree | 2bfc12bbf22b79479403121c90968ef183f6ddf1 /contrib | |
parent | 13c579bb7eb8e4025d26c69250b4583c998b9283 (diff) | |
download | gcc-345bab5914890d673753554ac80618521ff432e1.tar.gz |
2014-08-01 Yury Gribov <y.gribov@samsung.com>
* mklog: Allow running from arbitrary folder.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213401 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rwxr-xr-x | contrib/mklog | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/contrib/mklog b/contrib/mklog index cdc64551d5f..3d17dc54891 100755 --- a/contrib/mklog +++ b/contrib/mklog @@ -30,16 +30,15 @@ $username = $ENV{'USER'}; $name = `finger $username | grep -o 'Name: .*'`; @n = split(/: /, $name); -$name = @n[1]; chop($name); +$name = $n[1]; chop($name); $addr = $username . "\@my.domain.org"; $date = `date +%Y-%m-%d`; chop ($date); $gcc_root = $0; $gcc_root =~ s/[^\\\/]+$/../; -chdir $gcc_root; # if this is a git tree then take name and email from the git configuration -if (-d .git) { +if (-d "$gcc_root/.git") { $gitname = `git config user.name`; chomp($gitname); if ($gitname) { @@ -80,7 +79,7 @@ sub get_clname ($) { my $dirname = $_[0]; while ($dirname) { my $clname = "$dirname/ChangeLog"; - if (-f $clname) { + if (-f "$gcc_root/$clname") { my $relname = substr ($_[0], length ($dirname) + 1); return ($clname, $relname); } else { |