Permalink
Browse files

more apply_it stuff

  • Loading branch information...
1 parent 70887d6 commit d7ae6bd237ab65f8917cc147bbfe15bf0e174aec @gregkh committed Feb 11, 2011
Showing with 26 additions and 8 deletions.
  1. +24 −6 longterm/apply_it
  2. +2 −2 longterm/s.sh
View
@@ -1,24 +1,42 @@
#!/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"
-
+#echo "PATCH=$PATCH"
apply_it ()
{
VERSION=$1
DIR="linux-2.6.$VERSION.y"
- echo "DIR=$DIR"
+ # echo "DIR=$DIR"
+
+ echo -n "${txtrst}Applying $PATCH to $DIR "
cd $DIR
- quilt import ../$PATCH
- quilt push
- quilt ref
+ quilt import ../$PATCH &> /dev/null
+ quilt push &> /dev/null
+ if [ $? -ne 0 ] ; then
+ echo "${txtred} FAILED${txtrst}"
+ else
+ quilt ref &> /dev/null
+ echo "${txtgrn} SUCCEEDED${txtrst}"
+ fi
cd ..
}
View
@@ -2,9 +2,9 @@
USER=`whoami`
-DIR=/home/$USER/linux/stable
+DIR=/home/$USER/linux/longterm
SCRIPT_DIR=/home/$USER/linux
-KERNEL_DIR=$DIR/linux-2.6.36.y
+KERNEL_DIR=$DIR/linux-2.6.32.y
cd $DIR
cat - > $DIR/foo.patch

0 comments on commit d7ae6bd

Please sign in to comment.