summaryrefslogtreecommitdiff
path: root/v4l/scripts/makelinks.sh
blob: 9ee780abacd3c884700ae7da599c0593217590e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
# link drivers sources from CVS or release tarball into your 2.6.x kernel sources;

if test -z $1 || ! test -d $1 ; then
	echo
	echo "  usage: $0 <path_to_kernel_to_patch>"
	echo
	exit
fi

echo "patching $1..."

cd linux
PWD=`pwd`

for x in `find drivers -type d | grep -v CVS` ; do
	mkdir -p -v $1/$x
done

for x in `find Documentation -type d | grep -v CVS` ; do
	mkdir -p -v $1/$x
done

for x in `find include -type d | grep -v CVS` ; do
	mkdir -p -v $1/$x
done

for x in `find Documentation -type f | grep -v CVS | grep -v .cvsignore` ; do
	ln -f -s $PWD/$x $1/$x
done

for x in `find drivers -type f | grep -v CVS | grep -v .cvsignore` ; do
	ln -f -s $PWD/$x $1/$x
done

for x in `find include -type f | grep -v CVS | grep -v .cvsignore` ; do
	ln -f -s $PWD/$x $1/$x
done

for x in `find include -type d | grep -v CVS` ; do
	ln -f -s $PWD/../v4l/compat.h $1/$x/compat.h
	touch $1/$x/config-compat.h
done

for x in `find drivers/media -type d | grep -v CVS` ; do
	ln -f -s $PWD/../v4l/compat.h $1/$x/compat.h
	touch $1/$x/config-compat.h
done

cd ..