Revision: 96 http://svn.sourceforge.net/mactel-linux/?rev=96&view=rev Author: nboichat Date: 2007-04-02 21:33:05 -0700 (Mon, 02 Apr 2007)
Log Message: ----------- Update apply script to allow a patch to depend on another one. Modified Paths: -------------- trunk/kernel/mactel-patches-2.6.21/apply trunk/kernel/mactel-patches-2.6.21/unapply Modified: trunk/kernel/mactel-patches-2.6.21/apply =================================================================== --- trunk/kernel/mactel-patches-2.6.21/apply 2007-04-03 04:32:38 UTC (rev 95) +++ trunk/kernel/mactel-patches-2.6.21/apply 2007-04-03 04:33:05 UTC (rev 96) @@ -7,21 +7,26 @@ WORK=$PWD +APPLIED="" + cd $1 for i in `ls $WORK/*.patch` do patch -p1 --dry-run < $i > /dev/null if [ "$?" != "0" ]; then - echo "$i would not apply cleanly" + echo -n "$i" | sed -e "s/.*\/\(.*\)$/\1/" + echo " would not apply cleanly" + for j in $APPLIED + do + echo "$j" | sed -e "s/.*\/\(.*\)$/Reversing \1.../" + patch -s -R -p1 < $j + done exit fi -done - -for i in `ls $WORK/*.patch` -do echo "$i" | sed -e "s/.*\/\(.*\)$/Applying \1.../" - patch -p1 < $i + patch -s -p1 < $i + APPLIED="$i $APPLIED" done grep "^EXTRAVERSION *=.*-mactel$" Makefile > /dev/null Modified: trunk/kernel/mactel-patches-2.6.21/unapply =================================================================== --- trunk/kernel/mactel-patches-2.6.21/unapply 2007-04-03 04:32:38 UTC (rev 95) +++ trunk/kernel/mactel-patches-2.6.21/unapply 2007-04-03 04:33:05 UTC (rev 96) @@ -1,27 +1,32 @@ #!/bin/sh if [ "$1" == "" ]; then - echo "usage ./apply kerneldir" + echo "usage ./unapply kerneldir" exit 0 fi WORK=$PWD +REVERSED="" + cd $1 for i in `ls -r $WORK/*.patch` do patch -R -p1 --dry-run < $i > /dev/null if [ "$?" != "0" ]; then - echo "$i would not unapply cleanly" + echo -n "$i" | sed -e "s/.*\/\(.*\)$/\1/" + echo " would not reverse cleanly" + for j in $REVERSED + do + echo "$j" | sed -e "s/.*\/\(.*\)$/Applying \1.../" + patch -s -p1 < $j + done exit fi -done - -for i in `ls -r $WORK/*.patch` -do echo "$i" | sed -e "s/.*\/\(.*\)$/Reversing \1.../" - patch -R -p1 < $i + patch -s -R -p1 < $i + REVERSED="$i $REVERSED" done echo "changing version in Makefile" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Mactel-linux-devel mailing list Mactel-linux-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel