mirror of
https://github.com/fspc/gbootroot.git
synced 2025-04-04 07:43:22 -04:00
This provides proper output when the path has been changed, basically, if
it is the same thing again, it won't be listed.
This commit is contained in:
parent
849725cb71
commit
d50e13b210
@ -1837,8 +1837,18 @@ sub path {
|
|||||||
|
|
||||||
my @pathlist = split(':', $ENV{'PATH'});
|
my @pathlist = split(':', $ENV{'PATH'});
|
||||||
@main::additional_dirs = split(/:|\s+|,/,$entry[3]);
|
@main::additional_dirs = split(/:|\s+|,/,$entry[3]);
|
||||||
|
my @additional_dirs;
|
||||||
|
|
||||||
|
# Check to see if this path doesn't already exist.
|
||||||
|
foreach my $alt_path ( @main::additional_dirs ) {
|
||||||
|
my $add_path = grep(/$alt_path/,$ENV{'PATH'});
|
||||||
|
if ($add_path == 0) {
|
||||||
|
push(@additional_dirs, $alt_path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
info(1, "Search path is now:\n",
|
info(1, "Search path is now:\n",
|
||||||
join(" ", @main::additional_dirs), " ",
|
join(" ", @additional_dirs), " ",
|
||||||
join(" ", @pathlist), "\n");
|
join(" ", @pathlist), "\n");
|
||||||
}
|
}
|
||||||
} );
|
} );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user