summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2018-10-12 23:36:10 +0100
committerSergei Trofimovich <slyfox@gentoo.org>2018-10-12 23:36:10 +0100
commitcc0aba2194137567aaa852913d0be50e0047a442 (patch)
treef422c0244b9d5634543a7b131a619e067ce6e8a5 /rip-headers.sh
parentnew 4.18 patches: a copy of 4.17 patches (diff)
downloadlinux-headers-patches-cc0aba2194137567aaa852913d0be50e0047a442.tar.gz
linux-headers-patches-cc0aba2194137567aaa852913d0be50e0047a442.tar.bz2
linux-headers-patches-cc0aba2194137567aaa852913d0be50e0047a442.zip
rip-headers.sh: allow any DISTDIR, not just /usr/portage/distfiles
Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'rip-headers.sh')
-rwxr-xr-xrip-headers.sh5
1 files 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