diff options
-rw-r--r-- | quilt/setup.in | 37 |
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" ;; |