#!/bin/sh

. config/options $1

echo "### Applying project based patches ###"

for patch in `ls $PROJECT_DIR/$PROJECT/patches/$1`; do
  cat $PROJECT_DIR/$PROJECT/patches/$1/$patch | patch -d \
    `echo $PKG_BUILD | cut -f1 -d\ ` -p1
done
