xkbdata: Workaround n810 FN key issue
[openwrt/svn-archive/archive.git] / Xorg / generate.sh
1 #!/bin/sh
2 for d in `find . -name packages | grep driver`; do
3 cd `dirname $d`
4 echo "Entering "`dirname $d`
5 for p in `cat packages`; do
6 _NAME=${p%%|*}
7 NAME=${_NAME%-*}
8 BASE_NAME=${NAME%%-*}
9 VER=${_NAME##*-}
10 DEP=`echo ${p##*|} | sed "s/+/ +/g"`
11 echo generating Makefile for ${NAME}-${VER} with deps : ${DEP}
12 rm -f ${NAME}/Makefile
13 if [ -e ${NAME}/patches ]; then
14 rm -f ${NAME}/patches/*
15 fi
16 if [ "$1" = "gen" ]; then
17 if [ ! -e ${NAME} ]; then
18 mkdir ${NAME}
19 fi
20 sed "s/@VER@/${VER}/g" template.mk | sed "s/@DEP@/${DEP}/g" | sed "s/@NAME@/${NAME}/g" | sed "s/@BASE_NAME@/${BASE_NAME}/g" > ${NAME}/Makefile
21 if [ -d `pwd`/patches/${NAME} ]; then
22 if [ ! -d ${NAME}/patches ]; then
23 mkdir ${NAME}/patches
24 fi
25 cp -r `pwd`/patches/${NAME}/* ${NAME}/patches/
26 fi
27 fi
28 done
29 cd - > /dev/null
30 done