mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-18 03:01:26 +00:00
ibmvstgt: Generate clean patches, even if the input contains #ifdefs on LINUX_VERSION_CODE.
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@2415 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -1,5 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
function file_to_patch {
|
||||
echo "--- $1 "
|
||||
echo "+++ $1 "
|
||||
echo "@@ -1,0 +1,$(wc --lines $1) @@"
|
||||
sed 's/^/+/' "$1"
|
||||
}
|
||||
|
||||
function patch_to_file {
|
||||
tail -n +4 | sed 's/^.//'
|
||||
}
|
||||
|
||||
kernel_version="$1"
|
||||
|
||||
if [ "$1" = "" ]; then
|
||||
@@ -27,6 +38,10 @@ do
|
||||
fi
|
||||
f3="in-tree-patches/${kernel_version}/$g.patch"
|
||||
if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then
|
||||
diff -up "$f1" "$f2" > "$f3"
|
||||
file_to_patch "$f2" | \
|
||||
../scripts/specialize-patch -v kernel_version="$1" \
|
||||
-v generating_upstream_patch_defined=1 | \
|
||||
patch_to_file | \
|
||||
diff -up "$f1" - > "$f3"
|
||||
fi
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user