From 66c2bbb7e6057fad0ce9087b793c6f795e23fd9d Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 7 Jul 2020 21:26:10 -0700 Subject: [PATCH] projtool.pl: include "realpath" in project show output Usually the project's `realpath` and its `path` will be the same. However, if there are any symlink project "aliases" present or the $reporoot involves a symlink, the project's `realpath` will differ from it's logical `path`. Include `realpath` in the output to make this apparent when it happens. Signed-off-by: Kyle J. McKay --- toolbox/projtool.pl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/toolbox/projtool.pl b/toolbox/projtool.pl index 7a6f49e..f072b9f 100755 --- a/toolbox/projtool.pl +++ b/toolbox/projtool.pl @@ -249,6 +249,10 @@ sub get_clean_project { $project->{owner} = $project->{email}; delete $project->{email}; $project->{homepage} = $project->{hp}; delete $project->{hp}; $project->{baseurl} = $project->{url}; delete $project->{url}; + if (defined($project->{path}) && $project->{path} ne "") { + my $rp = realpath($project->{path}); + defined($rp) && $rp ne "" and $project->{realpath} = $rp; + } my $owner = $project->{owner}; if ($owner) { $owner = lc($owner); -- 2.11.4.GIT