-
Notifications
You must be signed in to change notification settings - Fork 16
/
apply_it
executable file
·55 lines (45 loc) · 1014 Bytes
/
apply_it
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash
# Text color variables
txtund=$(tput sgr 0 1) # Underline
txtbld=$(tput bold) # Bold
txtred=$(tput setaf 1) # Red
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
txtpur=$(tput setaf 5) # Purple
txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset
PATCH=$1
if [ "$PATCH" == "" ] ; then
echo "you need a patch!"
exit
fi
#echo "PATCH=$PATCH"
apply_it ()
{
VERSION=$1
DIR="linux-$VERSION.y"
# echo "DIR=$DIR"
echo "${txtrst}Applying ${txtylw}$PATCH${txtrst} to ${txtblu}$DIR${txtrst}"
cd $DIR
quilt import ../$PATCH &> /dev/null
if [ $? -ne 0 ] ; then
echo "${txtred} FAILED${txtrst} to import"
else
qp-stable
# quilt push &> /dev/null
echo ""
# if [ $? -ne 0 ] ; then
# echo "${txtred} FAILED${txtrst}"
# else
quilt ref &> /dev/null
# echo "${txtgrn} SUCCEEDED${txtrst}"
# fi
fi
cd ..
}
apply_it 3.3
apply_it 3.2
apply_it 3.0
#apply_it 2.6.39