]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
kbuild, deb-pkg: Check if KBUILD_IMAGE exists before copying it
authorGuillem Jover <guillem@hadrons.org>
Fri, 3 Sep 2010 02:33:28 +0000 (04:33 +0200)
committerMichal Marek <mmarek@suse.cz>
Mon, 6 Sep 2010 11:29:02 +0000 (13:29 +0200)
Avoid an error when doing cp over the image when it does not contain
the full path to the file.

Signed-off-by: Guillem Jover <guillem@hadrons.org>
Signed-off-by: Michal Marek <mmarek@suse.cz>
scripts/package/builddeb

index 5f1e2fc7f171e65dcf0dfd5f9c56afc3c77e7d9f..49b74e1ee12d0b97f9e2ca5759e853b4917c1aad 100644 (file)
@@ -66,7 +66,9 @@ else
        cp System.map "$tmpdir/boot/System.map-$version"
        cp .config "$tmpdir/boot/config-$version"
        # Not all arches include the boot path in KBUILD_IMAGE
-       if ! cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"; then
+       if [ -e $KBUILD_IMAGE ]; then
+               cp $KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
+       else
                cp arch/$ARCH/boot/$KBUILD_IMAGE "$tmpdir/boot/vmlinuz-$version"
        fi
 fi