On Sun, May 27, 2012 at 3:38 AM, Ozan Çağlayan <ozancag@xxxxxxxxx> wrote: > Use Ubuntu PPA vanilla kernels on other distributions too. > The .deb files are extracted using 'ar' and 'tar'. > > Also check if the target directory exists before downloading > the deb files. > > Signed-off-by: Ozan Çağlayan <ozancag@xxxxxxxxx> > --- > bin/get-compat-kernels | 81 ++++++++++++++++++++++++++++++++++-------------- > 1 file changed, 57 insertions(+), 24 deletions(-) > > diff --git a/bin/get-compat-kernels b/bin/get-compat-kernels > index 7a253c2..6cac898 100755 > --- a/bin/get-compat-kernels > +++ b/bin/get-compat-kernels > @@ -10,6 +10,9 @@ > # to test compile the Linux kernel compatibility module. You can > # then use ckmake to cross compile against all supported kernels. > > +KERNELS="" > +KPATH="http://kernel.ubuntu.com/~kernel-ppa/mainline/" > + > function get_ubuntu_kernels() { > > ARCH=$(uname -m) > @@ -28,10 +31,6 @@ function get_ubuntu_kernels() { > ;; > esac > > - KERNELS="" > - > - KPATH="http://kernel.ubuntu.com/~kernel-ppa/mainline/" > - > KERNELS="$KERNELS ${KPATH}/v2.6.24/linux-headers-2.6.24-020624_2.6.24-020624_all.deb" > KERNELS="$KERNELS ${KPATH}/v2.6.24/linux-headers-2.6.24-020624-generic_2.6.24-020624_${TARGET}.deb" > KERNELS="$KERNELS ${KPATH}/v2.6.24/linux-image-2.6.24-020624-generic_2.6.24-020624_${TARGET}.deb" > @@ -121,19 +120,63 @@ function get_ubuntu_kernels() { > continue > fi > > - if [[ ! -f $FILE ]]; then > + # Do not download if installed, I think this > + # workarounds the below XXX: comment. If I merge this patch the "XXX" comment would no longer present so anyone reading this comment would not understand what was being referred to with this. If this patch was meant more as an [RFC] then the placement of the comment makes sense but my recommendation would be to put these type of ephemeral comments right below the --- after the commig log and right before the diff stat. > + if [[ ! -d /usr/src/$PKG && ! -f $FILE ]]; then It is certainly a nice additional check, I'll take it, and yeah you can remove the comment also then. Nice stuff, I'll take these patches, feel free to send an [PATCH v2]! Luis -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html