summaryrefslogtreecommitdiffstats
path: root/needs-checking/combine-series
diff options
context:
space:
mode:
authorMartin Quinson <mquinson@debian.org>2003-01-21 09:49:29 +0000
committerMartin Quinson <mquinson@debian.org>2003-01-21 09:49:29 +0000
commit02dc4a5f8c1979e9a23f7b6851f693d29b640c4d (patch)
tree2f397f5df89f4529b89fd0e7a021238d0f290007 /needs-checking/combine-series
parent4d11e99bfc25e0261111d202a3a2afdf97daea5c (diff)
downloadquilt-02dc4a5f8c1979e9a23f7b6851f693d29b640c4d.tar.gz
Version 0.11, from Andreas Gruenbacher
Diffstat (limited to 'needs-checking/combine-series')
-rwxr-xr-xneeds-checking/combine-series46
1 files changed, 46 insertions, 0 deletions
diff --git a/needs-checking/combine-series b/needs-checking/combine-series
new file mode 100755
index 0000000..914acec
--- /dev/null
+++ b/needs-checking/combine-series
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+#
+# Make superpatch from current series using combinediff.
+#
+
+. patchfns 2>/dev/null ||
+. /usr/lib/patch-scripts/patchfns 2>/dev/null ||
+. $PATCHSCRIPTS_LIBDIR/patchfns 2>/dev/null ||
+{
+ echo "Impossible to find my library 'patchfns'."
+ echo "Check your install, or go to the right directory"
+ exit 1
+}
+
+usage()
+{
+ echo "Usage: combine-series output-file"
+ exit 1
+}
+
+if [ $# -ne 1 ]
+then
+ usage
+fi
+
+need_file_there series
+CURRENT=$(mktemp /tmp/cmbd-XXXXXXXX)
+for FILE in $(cat_series)
+do
+ NEXT=$(mktemp /tmp/cmbd-XXXXXXXX)
+ if [ -f $P/patches/$FILE ]
+ then
+ combinediff $CURRENT $P/patches/$FILE > $NEXT
+ elif [ -f $P/patches/$FILE.patch ]
+ then
+ combinediff $CURRENT $P/patches/$FILE.patch > $NEXT
+ elif [ -f $FILE ]
+ then
+ combinediff $CURRENT $FILE > $NEXT
+ fi
+ rm $CURRENT
+ CURRENT=$NEXT
+done
+
+mv $NEXT "$1"