File: prep-modules

package info (click to toggle)
alsadriver 0.2.0-pre8-3
  • links: PTS
  • area: main
  • in suites: slink
  • size: 2,808 kB
  • ctags: 6,550
  • sloc: ansic: 43,490; sh: 916; makefile: 759; perl: 54
file content (29 lines) | stat: -rw-r--r-- 669 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
#! /bin/sh

set -e

if [ $# -ne 1 ]; then
	echo Usage: $0 kernelsource-location
	exit 1
fi

changelog="$1/debian/changelog"
if [ ! -f $changelog ]; then
	echo "kernel changelog not found, cannot determine kernel version"
	exit 1
fi

linuxversion=`head -1 $changelog | \
	sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\1/'`

kernversion=`head -1 $changelog | \
	sed -e 's/.*source-\([^ ]*\) (\([^)]*\)).*/\2/'`

pkgversion=`head -1 debian/changelog | \
	sed -e 's/.*(\([^)]*\)).*/\1/'`

sed -e s/=KVERS/$linuxversion/ debian/control.module > debian/control
ln -s alsa-modules debian/tmp/usr/doc/alsa-modules-$linuxversion

echo "$pkgversion+$kernversion" > debian/VERSION