File: setup-alsa-kernel

package info (click to toggle)
alsa-driver 1.0.23%2Bdfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 28,448 kB
  • ctags: 77,491
  • sloc: ansic: 473,525; sh: 3,307; makefile: 2,661; python: 1,527; perl: 1,316; awk: 66
file content (73 lines) | stat: -rwxr-xr-x 1,777 bytes parent folder | download
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#!/bin/sh
#
# set up alsa-kernel directory from an external linux kernel tree
#
# the linux kernel tree has to contain the latest alsa-kernel files
# (this script doesn't check the consistency)
#
# with the option -c, the tree is copied instead of symlinks
# so that it can be easily archived
#

copy_tree=""

if [ x"$1" = x"-c" ]; then
    copy_tree=1
    shift
fi

if [ -z "$1" ]; then
    echo "usage: setup-alsa-kernel [-c] kernel-tree-dir"
    exit 1
fi

if [ ! -d acore ]; then
    echo "Run this script in alsa-driver directory"
    exit 1
fi

kern="$1"
alsa=$(pwd)
if [ -z "$copy_tree" ]; then
    rm -f $alsa/linux
    ln -s $kern linux
fi

rm -rf alsa-kernel
mkdir alsa-kernel
cd $kern/sound
for i in *; do
    if [ -n "$copy_tree" ]; then
	if [ "$i" = "oss" ]; then
	    mkdir $alsa/alsa-kernel/oss
	    cp oss/Makefile $alsa/alsa-kernel/oss
	else
	    cp -al $i $alsa/alsa-kernel/
	fi
    else
	ln -s ../linux/sound/$i $alsa/alsa-kernel/$i
    fi
done

cd $alsa
if [ -n "$copy_tree" ]; then
    cp -al $kern/include/sound alsa-kernel/include
    cp -al $kern/Documentation/sound/alsa alsa-kernel/Documentation
    cp -al $kern/Documentation/DocBook/alsa-driver-api.tmpl alsa-kernel/Documentation/DocBook
    cp -al $kern/Documentation/DocBook/writing-an-alsa-driver.tmpl alsa-kernel/Documentation/DocBook
    cp -al $kern/Documentation/DocBook/stylesheet.xsl alsa-kernel/Documentation/DocBook
else
    ln -s ../linux/include/sound alsa-kernel/include
    mkdir alsa-kernel/Documentation
    (cd alsa-kernel/Documentation;
	for i in ../../linux/Documentation/sound/alsa/*; do
	    ln -s $i
	done
	)
    ln -s ../../linux/Documentation/DocBook alsa-kernel/Documentation/
    rm -f scripts
    ln -s linux/scripts scripts
fi
rm -f sound
ln -s alsa-kernel sound
exit 0