mirror of
https://github.com/SCST-project/scst.git
synced 2026-08-21 14:46:23 +00:00
git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@1235 d57e44dd-8a1f-0410-8b47-8ef2f437770f
31 lines
592 B
Bash
Executable File
31 lines
592 B
Bash
Executable File
#!/bin/bash
|
|
|
|
kernel_version="$1"
|
|
|
|
if [ "$1" = "" ]; then
|
|
echo "Error: missing kernel version argument."
|
|
exit 1
|
|
fi
|
|
|
|
if [ "${1#2.6.26}" = "$1" ]; then
|
|
# Exit silently for other kernel versions than 2.6.26.x.
|
|
exit 0
|
|
fi
|
|
|
|
if [ ! -e qla2xxx-orig/$1 ]; then
|
|
./extract-qla2xxx-orig "$1"
|
|
fi
|
|
|
|
mkdir -p in-tree-patches/"${kernel_version}"
|
|
|
|
for f in qla2xxx-orig/"${kernel_version}"/*
|
|
do
|
|
g="${f#qla2xxx-orig/${kernel_version}/}"
|
|
f1="$f"
|
|
f2="$g"
|
|
f3="in-tree-patches/${kernel_version}/$g.patch"
|
|
if [ "$f1" -nt "$f3" -o "$f2" -nt "$f3" ]; then
|
|
diff -up "$f1" "$f2" > "$f3"
|
|
fi
|
|
done
|