#!/bin/sh

set -x
CUR_PATH=`pwd`
V3_PATH=$CUR_PATH/main/Cumulus/drivers/linux/v3

for file in `ls /boot/config-*`
do
    cd $CUR_PATH
    kernel_config_file=$(basename $file)
    kernel_version=${kernel_config_file##config-}

    cd $V3_PATH && make clean KVER=$kernel_version && make KVER=$kernel_version -j `grep -c ^processor /proc/cpuinfo` install
done



