install hooks: Interoperate with EAPI7

In EAPI7, the 'D' variable along with others doesn't have a trailing
slash anymore[1]. Let's use interoperable code here by removing any
trainling slash and then appending one manually.

[1] https://dev.gentoo.org/~mgorny/articles/the-ultimate-guide-to-eapi-7.html#d-ed-root-eroot-no-longer-have-a-trailing-slash

BUG=chromium:1011992
TEST=Emerge kernel with eapi7 package and make sure that .ko.debug and
vmlinux aren't scanned with llvm-readelf

Change-Id: I1984e8e67bf41db6ca78d6f4fe5bea9a11ab0922
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/crosutils/+/2099430
Commit-Queue: Stephen Boyd <swboyd@chromium.org>
Commit-Queue: Mike Frysinger <vapier@chromium.org>
Tested-by: Stephen Boyd <swboyd@chromium.org>
Auto-Submit: Stephen Boyd <swboyd@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
1 file changed