summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruen@suse.de>2003-02-02 15:32:55 +0000
committerAndreas Gruenbacher <agruen@suse.de>2003-02-02 15:32:55 +0000
commitabc9e6807e3897a76e471d958003fc7fd8941575 (patch)
tree933558dbc509c32b63d10d4ecdccf1ddfafe73b5
parent6b976b33849ff27dd6a0a1e37785abc55be15074 (diff)
downloadquilt-abc9e6807e3897a76e471d958003fc7fd8941575.tar.gz
Make quilt setup recognize "# Sourcedir:" directive
-rw-r--r--quilt/setup.in37
1 files changed, 22 insertions, 15 deletions
diff --git a/quilt/setup.in b/quilt/setup.in
index 300c2a5..900cc08 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -41,16 +41,18 @@ parse_series()
perl -e '
while(<>) {
- if (/^#\s*[Ss]ource:\s*(\S+)\s*(-C\s*(\S+))?/) {
- print "S $1 ", ($3 ? $3 : "."), "\n";
+ if (/^#\s*Sourcedir:\s*(\S+)/) {
+ print "SOURCEDIR $1\n";
+ } elsif (/^#\s*[Ss]ource:\s*(\S+)\s*(-C\s*(\S+))?/) {
+ print "SOURCE $1 ", ($3 ? $3 : "."), "\n";
} elsif (/^#\s*[Pp]atchdir:\s*(\S+)/) {
- print "D $1\n";
+ print "PATCHDIR $1\n";
} elsif (/^([^#\s]+)/) {
- print "P $1\n";
+ print "PATCH $1\n";
}
}
' $series
- echo "I $series"
+ echo "SERIES $series"
}
options=`getopt -o d:h -- "$@"`
@@ -117,8 +119,19 @@ while read cmd arg arg2 && \
[ $status -eq 0 ]
do
case $cmd in
- D)
- # Base directory for package
+ SOURCEDIR)
+ # Directory for package sources
+ source="$arg"
+ echo "Reading sources from $arg"
+ ;;
+ SOURCE)
+ echo "Unpacking archive $source/$arg"
+ mkdir -p "$arg2" && \
+ cat_file "$source/$arg" \
+ | tar xf - -C "${arg2:-.}"
+ ;;
+ PATCHDIR)
+ # Directory where package is expanded
packagedir="$arg"
if [ -d "$packagedir" ]
then
@@ -132,18 +145,12 @@ do
break
fi
;;
- S)
- echo "Unpacking archive $source/$arg"
- mkdir -p "$arg2" && \
- cat_file "$source/$arg" \
- | tar xf - -C "${arg2:-.}"
- ;;
- P)
+ PATCH)
echo "Copying patch $source/$arg"
mkdir -p "$packagedir/patches/" && \
cp "$source/$arg" "$packagedir/patches/" \
;;
- I)
+ SERIES)
echo "Copying series file"
cp "$arg" "$packagedir/patches/series"
;;