linux/debian/patches/features/all/vserver/gen-patch

15 lines
381 B
Bash
Executable File

#!/bin/sh
patch="$1"
error() {
echo "$@";
exit 1
}
version=$(filterdiff -p 1 -i Makefile "$patch" | grep "+EXTRAVERSION" | sed -e 's,.*-vs,vs,')
[ "$version" ] || error "can't find version!"
file="$(dirname $0)/$version.patch"
filterdiff -p 1 --strip 1 --addprefix=a/ -x Makefile -x include/linux/Kbuild -x include/linux/vserver/Kbuild "$patch" | grep -v "^diff" > "$file"