From cc0aba2194137567aaa852913d0be50e0047a442 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 12 Oct 2018 23:36:10 +0100 Subject: rip-headers.sh: allow any DISTDIR, not just /usr/portage/distfiles Signed-off-by: Sergei Trofimovich --- rip-headers.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'rip-headers.sh') 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 -- cgit v1.2.3-65-gdbad