Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100755 61 lines (50 sloc) 1.111 kb
70887d6 @gregkh apply_it script
authored
1 #!/bin/bash
2
3 # Text color variables
4 txtund=$(tput sgr 0 1) # Underline
5 txtbld=$(tput bold) # Bold
6 txtred=$(tput setaf 1) # Red
7 txtgrn=$(tput setaf 2) # Green
8 txtylw=$(tput setaf 3) # Yellow
9 txtblu=$(tput setaf 4) # Blue
10 txtpur=$(tput setaf 5) # Purple
11 txtcyn=$(tput setaf 6) # Cyan
12 txtwht=$(tput setaf 7) # White
13 txtrst=$(tput sgr0) # Text reset
14
15 PATCH=$1
16 if [ "$PATCH" == "" ] ; then
17 echo "you need a patch!"
18 exit
19 fi
20
92d9626 @gregkh stable/apply_it: handle kernel version on the command line
authored
21 KERNEL_VERSION=$2
22
70887d6 @gregkh apply_it script
authored
23 #echo "PATCH=$PATCH"
24
25 apply_it ()
26 {
27 VERSION=$1
0e26fa8 @gregkh lots of 3.0 changes needed to the scripts
authored
28 DIR="linux-$VERSION.y"
70887d6 @gregkh apply_it script
authored
29 # echo "DIR=$DIR"
30
5619bca @gregkh rework the way applying stable patches work.
authored
31 echo "${txtrst}Applying ${txtylw}$PATCH${txtrst} to ${txtblu}$DIR${txtrst}"
70887d6 @gregkh apply_it script
authored
32
33 cd $DIR
2ba605b @gregkh stable/apply_it: minor tweaks and add 3.3 kernel
authored
34
70887d6 @gregkh apply_it script
authored
35 quilt import ../$PATCH &> /dev/null
2ba605b @gregkh stable/apply_it: minor tweaks and add 3.3 kernel
authored
36 if [ $? -ne 0 ] ; then
37 echo "${txtred} FAILED${txtrst} to import"
70887d6 @gregkh apply_it script
authored
38 else
b8f3dfa @gregkh stable/apply_it: updates
authored
39 qp-stable -p
5619bca @gregkh rework the way applying stable patches work.
authored
40 # quilt push &> /dev/null
41 echo ""
42 # if [ $? -ne 0 ] ; then
43 # echo "${txtred} FAILED${txtrst}"
44 # else
45 quilt ref &> /dev/null
46 # echo "${txtgrn} SUCCEEDED${txtrst}"
47 # fi
70887d6 @gregkh apply_it script
authored
48 fi
5619bca @gregkh rework the way applying stable patches work.
authored
49
70887d6 @gregkh apply_it script
authored
50 cd ..
51 }
52
92d9626 @gregkh stable/apply_it: handle kernel version on the command line
authored
53 if [ "$KERNEL_VERSION" != "" ] ; then
54 apply_it $KERNEL_VERSION
55 else
85b560c @gregkh stable/apply_it: handle 3.5 now
authored
56 apply_it 3.5
204078f @gregkh 3.4 added to stable/apply_it
authored
57 apply_it 3.4
92d9626 @gregkh stable/apply_it: handle kernel version on the command line
authored
58 apply_it 3.0
59 #apply_it 2.6.39
60 fi
Something went wrong with that request. Please try again.