Skip to content

Commit

Permalink
more apply_it stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
gregkh committed Feb 11, 2011
1 parent 70887d6 commit d7ae6bd
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 8 deletions.
30 changes: 24 additions & 6 deletions longterm/apply_it
@@ -1,24 +1,42 @@
#!/bin/bash #!/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 PATCH=$1
if [ "$PATCH" == "" ] ; then if [ "$PATCH" == "" ] ; then
echo "you need a patch!" echo "you need a patch!"
exit exit
fi fi


echo "PATCH=$PATCH" #echo "PATCH=$PATCH"



apply_it () apply_it ()
{ {
VERSION=$1 VERSION=$1
DIR="linux-2.6.$VERSION.y" DIR="linux-2.6.$VERSION.y"
echo "DIR=$DIR" # echo "DIR=$DIR"

echo -n "${txtrst}Applying $PATCH to $DIR "


cd $DIR cd $DIR
quilt import ../$PATCH quilt import ../$PATCH &> /dev/null
quilt push quilt push &> /dev/null
quilt ref if [ $? -ne 0 ] ; then
echo "${txtred} FAILED${txtrst}"
else
quilt ref &> /dev/null
echo "${txtgrn} SUCCEEDED${txtrst}"
fi
cd .. cd ..
} }


Expand Down
4 changes: 2 additions & 2 deletions longterm/s.sh
Expand Up @@ -2,9 +2,9 @@


USER=`whoami` USER=`whoami`


DIR=/home/$USER/linux/stable DIR=/home/$USER/linux/longterm
SCRIPT_DIR=/home/$USER/linux SCRIPT_DIR=/home/$USER/linux
KERNEL_DIR=$DIR/linux-2.6.36.y KERNEL_DIR=$DIR/linux-2.6.32.y


cd $DIR cd $DIR
cat - > $DIR/foo.patch cat - > $DIR/foo.patch
Expand Down

0 comments on commit d7ae6bd

Please sign in to comment.