commit: cc0aba2194137567aaa852913d0be50e0047a442
Author: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 12 22:36:10 2018 +0000
Commit: Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Fri Oct 12 22:36:10 2018 +0000
URL:
https://gitweb.gentoo.org/proj/toolchain/linux-headers-patches.git/commit/?id=cc0aba21
rip-headers.sh: allow any DISTDIR, not just /usr/portage/distfiles
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>
rip-headers.sh | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/rip-headers.sh b/rip-headers.sh
index 78dce04..19efbd4 100755
--- a/rip-headers.sh
+++ b/rip-headers.sh
@@ -10,9 +10,10 @@ ver=${ver%/}
src=linux-${ver}
dst=gentoo-headers-base-${ver}
+distdir=$(portageq distdir)
if [ ! -d ${src} ] ; then
- for srcdir in . "$(portageq distdir)" /usr/portage/distfiles ; do
+ for srcdir in . "${distdir}" /usr/portage/distfiles ; do
for ext in bz2 xz ; do
srctar=${srcdir}/${src}.tar.${ext}
if [ -e ${srctar} ] ; then
@@ -23,7 +24,7 @@ if [ ! -d ${src} ] ; then
done
fi
if [ ! -d ${src} ] ; then
- wget
https://www.kernel.org/pub/linux/kernel/v${ver:0:1}.x/linux-${ver}.tar.xz -P
/usr/portage/distfiles/
+ wget
https://www.kernel.org/pub/linux/kernel/v${ver:0:1}.x/linux-${ver}.tar.xz -P
"${distdir}"
exec "$0" "$@"
fi