diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-12 23:36:10 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2018-10-12 23:36:10 +0100 |
commit | cc0aba2194137567aaa852913d0be50e0047a442 (patch) | |
tree | f422c0244b9d5634543a7b131a619e067ce6e8a5 /rip-headers.sh | |
parent | new 4.18 patches: a copy of 4.17 patches (diff) | |
download | linux-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-x | rip-headers.sh | 5 |
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 |