#!/bin/bash
shopt -s extglob

# Apply patches to the kernel source before running 'make oldconfig'
# since some of the patches change the kernel config files.


for i in sources/patches/!(*debian*)xz ; do echo $i ; done

source /usr/share/slackdev/buildkit.sh

export TMPBUILD=/tmp/papplier
rm -rf $TMPBUILD
mkdir -vpm755 $TMPBUILD

for i in ../patches/!(*debian*)xz ; do
   auto_apply_patch $i || exit 1
done
#tar xvvf ../patches/linux*debian*
#for i in debian/patches/features/arm/* ; do
#  auto_apply_patch $i || exit 1
#done


rm -rf $TMPBUILD
