2006-11-06 10:30:14 +00:00
|
|
|
#!/bin/sh
|
|
|
|
patch="$1"
|
|
|
|
|
|
|
|
error() {
|
|
|
|
echo "$@";
|
|
|
|
exit 1
|
|
|
|
}
|
|
|
|
|
2006-11-06 10:37:24 +00:00
|
|
|
version=$(filterdiff -p 1 -i Makefile "$patch" | grep "+EXTRAVERSION" | sed -e 's,.*-vs,vs,')
|
2006-11-06 10:30:14 +00:00
|
|
|
[ "$version" ] || error "can't find version!"
|
|
|
|
|
2006-11-06 10:37:24 +00:00
|
|
|
file="$(dirname $0)/$version.patch"
|
2006-11-06 10:30:14 +00:00
|
|
|
|
2008-12-28 16:55:48 +00:00
|
|
|
filterdiff -p 1 --strip 1 --addprefix=a/ -x Makefile -x include/linux/Kbuild -x include/linux/vserver/Kbuild "$patch" | grep -v "^diff" > "$file"
|