build_wl18xx: add protection in case KERNEL_VARIANT is not set
[wilink8-wlan/build-utilites.git] / 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;