build_wl18xx: add protection in case KERNEL_VARIANT is not set
authorEyal Reizer <eyalr@ti.com>
Thu, 12 Mar 2015 07:47:13 +0000 (09:47 +0200)
committerEyal Reizer <eyalr@ti.com>
Thu, 12 Mar 2015 07:47:13 +0000 (09:47 +0200)
KERNEL_VARIANT is a new environment variable that users that
already had their setup-env may not have it defined.
Avoid failure in applying driver patches in case it is not set.

Signed-off-by: Eyal Reizer <eyalr@ti.com>
build_wl18xx.sh

index b02d13b07e1dbb7693957aae8b04e65c0fa3d98a..20aa64e09dc6943376737de9b6146244dc9b28b6 100755 (executable)
@@ -314,7 +314,7 @@ function build_modules()
 {
        generate_compat
        cd_repo compat_wireless
 {
        generate_compat
        cd_repo compat_wireless
-       if [ -d "$PATH__ROOT/patches/driver_patches/$KERNEL_VARIANT" ]; then
+       if [ -n "$KERNEL_VARIANT" ] && [ -d "$PATH__ROOT/patches/driver_patches/$KERNEL_VARIANT" ]; then
                for i in $PATH__ROOT/patches/driver_patches/$KERNEL_VARIANT/*.patch; do
                        print_highlight "Applying driver patch: $i"
                        patch -p1 < $i;
                for i in $PATH__ROOT/patches/driver_patches/$KERNEL_VARIANT/*.patch; do
                        print_highlight "Applying driver patch: $i"
                        patch -p1 < $i;