Whamcloud - gitweb
LU-1346 contrib: fix libcfs_cleanup script
[fs/lustre-release.git] / lustre / kernel_patches / scripts / linus-patch
1 #!/bin/sh
2 #
3 # Grab a patch frmo kernel.org, install it.
4 #
5 # Usage: linus-patch http://www.kernel.org/pub/linux/kernel/people/dwmw2/bk-2.5/cset-1.786.152.7-to-1.798.txt.gz
6 #
7
8 . patchfns >/dev/null || . /usr/lib/patch-scripts/patchfns >/dev/null || { \
9         echo "Impossible to find my library 'patchfns'."
10         echo "Check your install, or go to the right directory"
11         exit 1
12 }
13
14 poppatch 999 || die poppatch
15 wget $1 || die wget
16 FILE=$(basename $1)
17 gzip -d < $FILE > $P/patches/linus.patch
18 pcpatch linus || die pcpatch
19 (
20         echo DESC
21         echo $FILE
22         echo EDESC
23         echo
24         echo $FILE
25 ) > $P/txt/linus.txt
26 rm $FILE