Skip to content
Browse files

apply_it script

  • Loading branch information...
1 parent f69cda5 commit 70887d6bcbfdd98dd73adf6bb82e1929d67d8173 @gregkh committed Feb 11, 2011
Showing with 73 additions and 0 deletions.
  1. +27 −0 longterm/apply_it
  2. +46 −0 stable/apply_it
View
27 longterm/apply_it
@@ -0,0 +1,27 @@
+#!/bin/bash
+
+PATCH=$1
+if [ "$PATCH" == "" ] ; then
+ echo "you need a patch!"
+ exit
+fi
+
+echo "PATCH=$PATCH"
+
+
+apply_it ()
+{
+ VERSION=$1
+ DIR="linux-2.6.$VERSION.y"
+ echo "DIR=$DIR"
+
+ cd $DIR
+ quilt import ../$PATCH
+ quilt push
+ quilt ref
+ cd ..
+}
+
+apply_it 32
+apply_it 33
+
View
46 stable/apply_it
@@ -0,0 +1,46 @@
+#!/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-2.6.$VERSION.y"
+ # echo "DIR=$DIR"
+
+ echo -n "${txtrst}Applying $PATCH to $DIR "
+
+ cd $DIR
+ 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 ..
+}
+
+
+apply_it 36
+apply_it 37
+

0 comments on commit 70887d6

Please sign in to comment.
Something went wrong with that request. Please try again.