Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 63 lines (52 sloc) 1.11 KB
#!/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
KERNEL_VERSION=$2
#echo "PATCH=$PATCH"
apply_it ()
{
VERSION=$1
DIR="linux-$VERSION.y"
# echo "DIR=$DIR"
echo "${txtrst}Applying ${txtylw}$PATCH${txtrst} to ${txtcyn}$DIR${txtrst}"
cd $DIR
quilt import ../$PATCH &> /dev/null
if [ $? -ne 0 ] ; then
echo "${txtred} FAILED${txtrst} to import"
else
qp-stable -p
# 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 ..
}
if [ "$KERNEL_VERSION" != "" ] ; then
apply_it $KERNEL_VERSION
else
apply_it 4.16
apply_it 4.14
apply_it 4.9
apply_it 4.4
apply_it 3.18
fi