Revision: 95
http://svn.sourceforge.net/mactel-linux/?rev=95&view=rev
Author: nboichat
Date: 2007-04-02 21:32:38 -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.20/apply
trunk/kernel/mactel-patches-2.6.20/unapply
Modified: trunk/kernel/mactel-patches-2.6.20/apply
===================================================================
--- trunk/kernel/mactel-patches-2.6.20/apply 2007-03-24 18:06:03 UTC (rev 94)
+++ trunk/kernel/mactel-patches-2.6.20/apply 2007-04-03 04:32:38 UTC (rev 95)
@@ -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.20/unapply
===================================================================
--- trunk/kernel/mactel-patches-2.6.20/unapply 2007-03-24 18:06:03 UTC (rev 94)
+++ trunk/kernel/mactel-patches-2.6.20/unapply 2007-04-03 04:32:38 UTC (rev 95)
@@ -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
[email protected]
https://lists.sourceforge.net/lists/listinfo/mactel-linux-devel