summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile31
-rw-r--r--bin/.cvsignore2
-rw-r--r--bin/guards.in246
-rw-r--r--bin/quilt.in2
-rw-r--r--lib/.cvsignore2
-rwxr-xr-xlib/apatch.in2
-rwxr-xr-xlib/parse-patch.in129
-rw-r--r--lib/patchfns.in2
-rwxr-xr-xlib/rpatch.in2
-rwxr-xr-xlib/spec2series.in223
-rw-r--r--quilt.changes10
-rw-r--r--quilt/add.in2
-rw-r--r--quilt/applied.in2
-rw-r--r--quilt/delete.in2
-rw-r--r--quilt/diff.in2
-rw-r--r--quilt/files.in2
-rw-r--r--quilt/import.in2
-rw-r--r--quilt/new.in2
-rw-r--r--quilt/next.in2
-rw-r--r--quilt/patches.in2
-rw-r--r--quilt/pop.in2
-rw-r--r--quilt/previous.in2
-rw-r--r--quilt/push.in2
-rw-r--r--quilt/refresh.in2
-rw-r--r--quilt/remove.in2
-rwxr-xr-xquilt/rest.in2
-rw-r--r--quilt/series.in2
-rw-r--r--quilt/setup.in2
-rw-r--r--quilt/top.in2
29 files changed, 649 insertions, 38 deletions
diff --git a/Makefile b/Makefile
index 8276b99..667d0eb 100644
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,9 @@ docdir := $(datadir)/doc/packages
QUILT_DIR = $(datadir)/$(PACKAGE)
LIB_DIR = $(datadir)/$(PACKAGE)/lib
+PERL := /usr/bin/perl
+BASH := /bin/bash
+
CFLAGS = -g -Wall
#-----------------------------------------------------------------------
@@ -20,9 +23,9 @@ SRC += COPYING AUTHORS TODO BUGS Makefile \
quilt.spec.in quilt.spec quilt.changes
DIRT += quilt.spec
-BIN_IN := quilt
-BIN_SRC := $(BIN_IN:%=%.in) guards
-BIN := $(BIN_IN) guards
+BIN_IN := quilt guards
+BIN_SRC := $(BIN_IN:%=%.in)
+BIN := $(BIN_IN)
SRC += $(BIN_SRC:%=bin/%)
DIRT += $(BIN_IN:%=bin/%)
@@ -34,10 +37,9 @@ QUILT := $(QUILT_IN)
SRC += $(QUILT_SRC:%=quilt/%)
DIRT += $(QUILT_IN:%=quilt/%)
-LIB_IN := apatch rpatch patchfns
-LIB_SRC := $(LIB_IN:%=%.in) parse-patch spec2series \
- backup-files.c
-LIB := $(LIB_IN) parse-patch spec2series backup-files
+LIB_IN := apatch rpatch patchfns parse-patch spec2series
+LIB_SRC := $(LIB_IN:%=%.in) backup-files.c
+LIB := $(LIB_IN) backup-files
SRC += $(LIB_SRC:%=lib/%)
DIRT += $(LIB_IN:%=lib/%) lib/backup-files{,.o}
@@ -79,12 +81,15 @@ bin/guards.1 : bin/guards
mkdir -p $$(dirname $@)
pod2man $< > $@
-dist : spec
+dist : $(PACKAGE)-$(VERSION).tar.gz
+
+$(PACKAGE)-$(VERSION).tar.gz : $(SRC)
rm -f $(PACKAGE)-$(VERSION)
ln -s . $(PACKAGE)-$(VERSION)
- tar cvfz $(PACKAGE)-$(VERSION).tar.gz \
- $(SRC:%=$(PACKAGE)-$(VERSION)/%)
+ tar cfz $(PACKAGE)-$(VERSION).tar.gz \
+ $(+:%=$(PACKAGE)-$(VERSION)/%)
rm -f $(PACKAGE)-$(VERSION)
+ @echo "File $@ created."
install : all
install -d $(BUILD_ROOT)$(bindir)
@@ -105,8 +110,8 @@ install : all
install -d $(BUILD_ROOT)$(mandir)/man1
install -m 644 $(MAN1) $(BUILD_ROOT)$(mandir)/man1/
-spec : $(PACKAGE).spec
-$(PACKAGE).spec : $(PACKAGE).spec.in $(PACKAGE).changes
+$(PACKAGE).spec : $(PACKAGE).spec.in $(PACKAGE).changes Makefile \
+ lib/parse-patch
@echo "Generating spec file"
@sed -e 's/^\(Version:[ \t]*\).*/\1$(VERSION)/' \
-e 's/^\(Release:[ \t]\).*/\1$(RELEASE)/' \
@@ -130,5 +135,7 @@ clean distclean :
@echo "$< -> $@"
@sed -e "s:@LIB@:$(LIB_DIR):g" \
-e "s:@QUILT@:$(QUILT_DIR):g" \
+ -e "s:@PERL@:$(PERL):g" \
+ -e "s:@BASH@:$(BASH):g" \
$< > $@
@chmod --reference=$< $@
diff --git a/bin/.cvsignore b/bin/.cvsignore
index 3cbe4cc..71bd359 100644
--- a/bin/.cvsignore
+++ b/bin/.cvsignore
@@ -1 +1 @@
-quilt guards.1
+quilt guards.1 guards
diff --git a/bin/guards.in b/bin/guards.in
new file mode 100644
index 0000000..181268d
--- /dev/null
+++ b/bin/guards.in
@@ -0,0 +1,246 @@
+#!@PERL@ -w
+
+# This script is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# See the COPYING and AUTHORS files for more details.
+
+use FileHandle;
+use Getopt::Long;
+use strict;
+
+# Prototypes
+sub files_in($$);
+sub parse($$);
+sub help();
+
+sub slashme($) {
+ my ($dir) = @_;
+ $dir =~ s#([^/])$#$&/#; # append a slash if necessary
+ if ($dir eq './') {
+ return '';
+ } else {
+ return $dir;
+ }
+}
+
+# Generate a list of files in a directory
+#
+sub files_in($$) {
+ my ($dir, $path) = @_;
+ my $dh = new FileHandle;
+ my (@files, $file);
+
+
+ opendir $dh, length("$dir$path") ? "$dir$path" : '.'
+ or die "$dir$path: $!\n";
+ while ($file = readdir($dh)) {
+ next if $file =~ /^(\.|\.\.|\.#.*|CVS)$/;
+ if (-d "$dir$path$file") {
+ @files = (@files, files_in($dir, "$path$file/"));
+ } else {
+ #print "[$path$file]\n";
+ push @files, "$path$file";
+ }
+ }
+ closedir $dh;
+ return @files;
+}
+
+# Parse a configuration file
+# Callback called with ($patch, @guards) arguments
+#
+sub parse($$) {
+ my ($fh, $callback) = @_;
+
+ my $mode = 0;
+
+ while (<$fh>) {
+ my @guards = ();
+ s/(^|\s+)#.*//;
+ foreach my $token (split) {
+ if ($token =~ /^[-+]/) {
+ if ($mode == 1) {
+ @guards = ();
+ $mode = 0;
+ }
+ push @guards, $token;
+ } else {
+ $mode = 1;
+ #print "[" . join(",", @guards) . "] $patch\n";
+ &$callback($token, @guards);
+ }
+ }
+ }
+}
+
+# Command line options
+#
+my ($dir, $config, $default, $check) = ('', '-', 1, 0);
+my @path;
+
+# Help text
+#
+sub help() {
+ print "$0 - select from a list of files guarded by conditions\n";
+ print "SYNOPSIS: $0 [--prefix=dir] [--path=dir1:dir2:...]\n" .
+ " [--default=0|1] [--check] [--config=file] symbol ...\n\n" .
+ " (Default values: --path='" . join(':', @path) . "', " .
+ "--default=$default)\n";
+ exit 0;
+}
+
+# Parse command line options
+#
+Getopt::Long::Configure ("bundling");
+eval {
+ unless (GetOptions (
+ 'd|prefix=s' => \$dir,
+ 'c|config=s' => \$config,
+ 'C|check' => \$check,
+ 'p|path=s' => \@path,
+ 'D|default=i' => \$default,
+ 'h|help' => sub { help(); exit 0; })) {
+ help();
+ exit 1;
+ }
+};
+if ($@) {
+ print "$@";
+ help();
+ exit 1;
+}
+
+@path = ('.')
+ unless (@path);
+@path = split(/:/, join(':', @path));
+
+my $fh = ($config eq '-') ? \*STDIN : new FileHandle($config)
+ or die "$config: $!\n";
+
+$dir = slashme($dir);
+
+if ($check) {
+ # Check for duplicate files, or for files that are not referenced by
+ # the specification.
+
+ my $problems = 0;
+ my @files;
+
+ foreach (@path) {
+ @files = (@files, files_in($dir, slashme($_)));
+ }
+ my %files = map { $_ => 0 } @files;
+
+ parse($fh, sub {
+ my ($patch, @guards) = @_;
+ if (exists $files{$patch}) {
+ $files{$patch}++;
+ } else {
+ print "Not found: $dir$patch\n";
+ $problems++;
+ }});
+
+ $fh->close();
+
+ my ($file, $ref);
+ while (($file, $ref) = each %files) {
+ next if $ref == 1;
+
+ print "Unused: $file\n" if $ref == 0;
+ print "Multiple uses: $file\n" if $ref > 1;
+ $problems++;
+ }
+ exit $problems ? 1 : 0;
+
+} else {
+ # Generate a list of patches to apply.
+
+ my %symbols = map { $_ => 1 } @ARGV;
+
+ parse($fh, sub {
+ my ($patch, @guards) = @_;
+
+ my $selected;
+ if (@guards) {
+ # If the first guard is -xxx, the patch is included by default;
+ # if it is -xxx, the patch is excluded by default.
+ $selected = ($guards[0] =~ /^-/);
+
+ foreach (@guards) {
+ /^([-+])(!?)(.*)?/
+ or die "Bad guard '$_'\n";
+
+ # Check if the guard matches
+ if (($2 eq '!' && !exists $symbols{$3}) ||
+ ($2 eq '' && ( $3 eq '' || exists $symbols{$3}))) {
+ # Include or exclude
+ $selected = ($1 eq '+');
+ }
+ }
+ } else {
+ # If there are no guards, use the specified default result.
+ $selected = $default;
+ }
+
+ print "$dir$patch\n"
+ if $selected;
+ });
+
+ $fh->close();
+
+ exit 0;
+}
+
+__END__
+
+=head1 NAME
+
+guards - select from a list of files guarded by conditions
+
+=head1 SYNOPSIS
+
+F<guards> [--prefix=F<dir>] [--path=F<dir2:dir2:...>]
+ [--default=I<0>|I<1>] [--check] [--config=F<file>]
+ I<symbol> ...
+
+=head1 DESCRIPTION
+
+The script reads a configuration file that may contain so-called guards, file
+names, and comments, and writes those file names that satisfy all guards to
+standard output. The script takes a list of symbols as its arguments. Each line
+in the ocnfiguration file is processed separately. Lines may start with a
+number of guards. The following guards are defined:
+
+=over
+
++I<xxx> Include the file(s) on this line if the symbol I<xxx> is defined.
+
+-I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is defined.
+
++!I<xxx> Include the file(s) on this line if the symbol I<xxx> is not defined.
+
+-!I<xxx> Exclude the file(s) on this line if the symbol I<xxx> is not defined.
+
+- Exclude this file. Used to avoid spurious I<--check> messages.
+
+=back
+
+The guards are processed left to right. The last guard that matches determines
+if the file is included. If no guard is specified, the I<--default>
+setting determines if the file is included.
+
+If no configuration file is specified, the script reads from standard input.
+
+The I<--check> option is used to compare the specification file against the
+file system. If files are referenced in the specification that do not exist, or
+if files are not enlisted in the specification file warnings are printed. The
+I<--path> option can be used to specify which directory or directories to scan.
+Multiple directories are eparated by a colon (C<:>) character. The
+I<--prefix> option specifies the location of the files.
+
+=head1 AUTHOR
+
+Andreas Gruenbacher <agruen@suse.de> (SuSE Linux AG)
+
diff --git a/bin/quilt.in b/bin/quilt.in
index d1a6867..521e0ba 100644
--- a/bin/quilt.in
+++ b/bin/quilt.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/lib/.cvsignore b/lib/.cvsignore
index 43b00a3..d672ac5 100644
--- a/lib/.cvsignore
+++ b/lib/.cvsignore
@@ -1 +1 @@
-apatch backup-files rpatch patchfns
+apatch backup-files rpatch patchfns parse-patch spec2series
diff --git a/lib/apatch.in b/lib/apatch.in
index 3a13238..593b32f 100755
--- a/lib/apatch.in
+++ b/lib/apatch.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/lib/parse-patch.in b/lib/parse-patch.in
new file mode 100755
index 0000000..56c3c55
--- /dev/null
+++ b/lib/parse-patch.in
@@ -0,0 +1,129 @@
+#!@PERL@ -w
+
+# This script is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# See the COPYING and AUTHORS files for more details.
+
+# Extract or update a section from a combined patch + documentation +
+# meta information file.
+
+use FileHandle;
+use Getopt::Long;
+use File::Temp qw(tempfile);
+use strict;
+
+my $select;
+my $update;
+
+if (!GetOptions("s|select=s" => \$select,
+ "u|update=s" => \$update) ||
+ (!defined $select && !defined $update)) {
+ print STDERR "USAGE: $0 {-s|-u} section file [< replacement]\n";
+ exit 1;
+}
+
+foreach my $arg (@ARGV) {
+ my $fh;
+
+ if (! -e $arg) {
+ $fh = new FileHandle("/dev/null");
+ } elsif ($arg =~ /\.gz$/) {
+ $fh = new FileHandle("gzip -cd $arg |");
+ } elsif ($arg =~ /\.bz2$/) {
+ $fh = new FileHandle("bzip2 -cd $arg |");
+ } else {
+ $fh = new FileHandle("< $arg");
+ }
+
+ unless ($fh) {
+ print STDERR "$arg: $!\n";
+ next;
+ }
+
+ if (defined $select) {
+ my $section = "head";
+ my $newline = "";
+ while (<$fh>) {
+ if (/^%(.*)/) {
+ last if $section eq $select;
+ $section = $1;
+ next;
+ }
+ if ($section eq $select) {
+ print $newline;
+ if ($_ eq "\n") {
+ $newline = $_;
+ } else {
+ $newline="";
+ print;
+ }
+ }
+ }
+ } elsif (defined $update) {
+ my ($fh2, $tempname) = tempfile("$arg.XXXXXX");
+ if ($arg =~ /\.gz$/) {
+ $fh2->close();
+ if (! -e $tempname) {
+ die "File $tempname disappeared!\n";
+ }
+ $fh2 = new FileHandle("| gzip -c > $tempname");
+ } elsif ($arg =~ /\.bz2$/) {
+ $fh2->close();
+ if (! -e $tempname) {
+ die "File $tempname disappeared!\n";
+ }
+ $fh2 = new FileHandle("| bzip2 -c > $tempname");
+ }
+ unless ($fh2) {
+ die "$tempname: $!\n";
+ }
+
+ # Copy things before updated section
+ my $last_was_newline=1; # start first section in first line
+ while (<$fh>) {
+ if (/^%(.*)/ && $1 eq $update) {
+ last;
+ }
+ $last_was_newline = ($_ eq "\n");
+ print $fh2 $_;
+ }
+ print $fh2 "\n"
+ unless ($last_was_newline);
+
+ # Create/replace updated section
+ print $fh2 "%$update\n";
+ while (<STDIN>) {
+ print $fh2 $_;
+ }
+ print $fh2 "\n";
+
+ # Skip obsolete section
+ while (<$fh>) {
+ if (/^%(.*)/) {
+ print $fh2 $_;
+ last;
+ }
+ }
+ # Copy things after updated section
+ while (<$fh>) {
+ print $fh2 $_;
+ }
+ unless (close $fh2) {
+ die "$arg.patch: $!\n";
+ }
+
+ if (-e $arg) {
+ unlink "$arg~";
+ unless (rename $arg, "$arg~") {
+ die "Failed to rename $arg to $arg~: $!\n";
+ }
+ }
+ unless (rename $tempname, $arg) {
+ rename("$arg~", $arg);
+ die "Failed to rename $arg.parse to $arg: $!\n";
+ }
+ }
+ close $fh;
+}
diff --git a/lib/patchfns.in b/lib/patchfns.in
index de8e715..b4123c9 100644
--- a/lib/patchfns.in
+++ b/lib/patchfns.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/lib/rpatch.in b/lib/rpatch.in
index 85e8408..2d39bf1 100755
--- a/lib/rpatch.in
+++ b/lib/rpatch.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/lib/spec2series.in b/lib/spec2series.in
new file mode 100755
index 0000000..6f6b636
--- /dev/null
+++ b/lib/spec2series.in
@@ -0,0 +1,223 @@
+#!@BASH@
+
+# This script is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License version 2 as
+# published by the Free Software Foundation.
+#
+# See the COPYING and AUTHORS files for more details.
+
+# defaults
+debug=0
+specfile=""
+outfile=""
+
+function usage() {
+cat <<EOF
+Usage: quilt spec2series [ options ] specfile
+
+-h print this text
+-d debug mode (prints lots additional info
+ as comments into the output file)
+-o <file>
+ specify output file, stdout if unspecified
+
+EOF
+}
+
+# parse args
+while test "$1" != ""; do
+ case "$1" in
+ -h | --help)
+ usage; exit 0
+ ;;
+ -d | --debug)
+ debug=1; shift
+ ;;
+ -o | --outfile)
+ outfile="$2"; shift; shift
+ ;;
+ *)
+ specfile="$1"
+ break;
+ ;;
+ esac
+done
+
+if test ! -f "$specfile"; then
+ usage
+ exit 1
+fi
+
+# get absolute patch for specfile location
+specdir=`dirname $specfile`
+specfile=`basename $specfile`
+case "$specdir" in
+ .) specdir="`pwd`"
+ ;;
+ /*) # nothing
+ ;;
+ *) specdir="`pwd`/$specdir"
+ ;;
+esac
+
+# create tmp work dir
+WORK="${TMPDIR-/tmp}/rpmlog-$$"
+mkdir -p "$WORK" || exit 1
+trap 'rm -rf "$WORK"' EXIT
+mkdir -p "$WORK/build"
+mkdir -p "$WORK/bin"
+
+# create md5 sums, also for uncompressed files
+echo -n "### md5: " >&2
+(cd $specdir; for file in /dev/null *; do
+ case "$file" in
+ ready | bigpack | MD5SUMS | MD5SUMS.meta | *.spec | *.changes)
+ continue
+ ;;
+ esac
+ type="`file -b $file | cut -d" " -f1`"
+ case "$type" in
+ compress*)
+ echo -n "z" >&2
+ set -- `zcat $file | md5sum`
+ echo "$1 zcat ${file}"
+ ;;
+ gzip)
+ echo -n "g" >&2
+ set -- `zcat $file | md5sum`
+ echo "$1 zcat ${file}"
+ ;;
+ bzip2)
+ echo -n "b" >&2
+ set -- `bzcat $file | md5sum`
+ echo "$1 bzcat ${file}"
+ ;;
+ esac
+ echo -n "." >&2
+ set -- `md5sum < $file`
+ echo "$1 cat ${file}"
+done) > $WORK/md5sum
+echo " done" >&2
+
+# prepare rpm dir fixups and hooks
+RPM="rpm --rcfile=/usr/lib/rpm/rpmrc:$WORK/rpmrc"
+PATH="$WORK/bin:$PATH"
+grep ^macrofiles /usr/lib/rpm/rpmrc \
+ | sed -e "/macrofiles/s|$|:$WORK/rpmmacros|" \
+ > $WORK/rpmrc
+cat <<-EOF > "$WORK/rpmmacros"
+ %_sourcedir $specdir
+ %_specdir $specdir
+ %_builddir $WORK/build
+EOF
+
+# wrapper script for patch and tar
+cat <<-'EOF' > "$WORK/bin/patch"
+ #!/bin/sh
+
+ # save stuff for log
+ unpackcmd=`basename $0`
+ unpackdir=`pwd`
+ unpackargs="$*"
+ uncompress="false"
+ unpackfile="[oops]"
+
+ # sort of progress bar
+ case $unpackcmd in
+ tar) echo -n "t" >&2;;
+ patch) echo -n "p" >&2;;
+ *) echo -n "?" >&2;;
+ esac
+
+ # find real binary
+ realcmd=""
+ test -x "/bin/$unpackcmd" && realcmd="/bin/$unpackcmd"
+ test -x "/usr/bin/$unpackcmd" && realcmd="/usr/bin/$unpackcmd"
+ test "$realcmd" = "" && exit 1
+
+ # put data into tmpfile, exec real cmd, return on failure
+ WORK=`dirname $RPM_BUILD_DIR`
+ cat > "$WORK/data"
+ if test -x /bin/$unpackcmd; then
+ cmddir="/bin"
+ fi
+ $realcmd $* < "$WORK/data"
+ retval="$?"
+ test "$retval" != "0" && exit $retval
+
+ # find original data file by md5sum
+ set -- `md5sum < "$WORK/data"`
+ unpackfile="[$1]"
+ set -- `cat "$WORK/md5sum"`
+ while test "$1" != ""; do
+ if test "[$1]" = "$unpackfile"; then
+ uncompress="$2"
+ unpackfile="$3"
+ break
+ fi
+ shift
+ done
+
+ # print results
+ unpackdir=`echo $unpackdir | sed -e "s|$RPM_BUILD_DIR|BUILD|"`
+ echo -n "# log: [$unpackdir] $uncompress $unpackfile" >>$WORK/cmdlog
+ echo " | $unpackcmd $unpackargs" >>$WORK/cmdlog
+ if test "$unpackcmd" = "patch" -a \
+ -f "$RPM_SOURCE_DIR/$unpackfile"; then
+ patchdir="${unpackdir#BUILD/}"
+ if test ! -f "$WORK/patchdir"; then
+ echo -n $patchdir > $WORK/patchdir
+ fi
+ if test "`cat $WORK/patchdir`" = "$patchdir"; then
+ level=`echo $unpackargs | tr " " "\n" | grep ^-p`
+ echo "$unpackfile $level" >> $WORK/patchlog
+ fi
+ fi
+ if test "$unpackcmd" = "tar" -a \
+ -f "$RPM_SOURCE_DIR/$unpackfile"; then
+ echo -n "# Source: $unpackfile" >>$WORK/tarlog
+ if test "$unpackdir" != "BUILD"; then
+ echo -n " -C ${unpackdir#BUILD/}" >>$WORK/tarlog
+ fi
+ echo "" >>$WORK/tarlog
+ fi
+EOF
+chmod 755 "$WORK/bin/patch"
+ln -s patch "$WORK/bin/tar"
+
+# let rpm do all the dirty specfile stuff ...
+echo -n "### rpm: " >&2
+touch $WORK/patchlog
+$RPM --nodeps --quiet -bp "$specdir/$specfile" </dev/null
+echo " done" >&2
+
+# print results saved by the wrapper script
+(
+ # header
+ echo "# Patch series file for quilt, created by $0"
+ echo "#"
+ echo "# Sourcedir: $specdir"
+ echo "# Specfile: $specfile"
+ if test -f $WORK/patchdir; then
+ echo "# Patchdir: `cat $WORK/patchdir`"
+ fi
+ echo "#"
+
+ # additional info for trouble shooting
+ if test "$debug" = "1"; then
+ cat $WORK/md5sum | sed -e 's/^/# md5: /'
+ echo "#"
+
+ test -f $WORK/cmdlog && cat $WORK/cmdlog && echo "#"
+ fi
+
+ # list tarballs + patches
+ test -f $WORK/tarlog && cat $WORK/tarlog && echo "#"
+ test -f $WORK/patchlog && cat $WORK/patchlog
+)|(
+ if test "$outfile" != ""; then
+ cat > "$outfile"
+ else
+ cat
+ fi
+)
diff --git a/quilt.changes b/quilt.changes
index e909051..19663e9 100644
--- a/quilt.changes
+++ b/quilt.changes
@@ -1,11 +1,17 @@
-------------------------------------------------------------------
+Thu Jan 30 13:06:36 CET 2003 - agruen@suse.de
+- Fix some regex quoting; use grep -E because we quote for extended
+ regexps. Filenames with "+^$" in it did not work in some places.
+- Prepare for GNU Autoconf: substitute @PERL@ and @BASH@ in
+ scripts.
+- Some cleanups in Makefile.
+
+-------------------------------------------------------------------
Tue Jan 28 23:41:19 CET 2003 - agruen@suse.de
- Add --leave-rejects option to quilt push and apatch, to
leave reject files around for inspection even if a patch
does not apply.
-- Fix some regex quoting; use grep -E because we quote for extended
- regexps. Filenames with "+^$" in it did not work in some places.
-------------------------------------------------------------------
Tue Jan 28 23:38:59 CET 2003 - agruen@suse.de
diff --git a/quilt/add.in b/quilt/add.in
index 39e1a36..c543e4f 100644
--- a/quilt/add.in
+++ b/quilt/add.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/applied.in b/quilt/applied.in
index cbefdca..8bac6a4 100644
--- a/quilt/applied.in
+++ b/quilt/applied.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/delete.in b/quilt/delete.in
index 3c5cb91..87e660e 100644
--- a/quilt/delete.in
+++ b/quilt/delete.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/diff.in b/quilt/diff.in
index a114f8a..b42837a 100644
--- a/quilt/diff.in
+++ b/quilt/diff.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/files.in b/quilt/files.in
index 6ea95d2..77f73b4 100644
--- a/quilt/files.in
+++ b/quilt/files.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/import.in b/quilt/import.in
index 0f3df93..d3d115c 100644
--- a/quilt/import.in
+++ b/quilt/import.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/new.in b/quilt/new.in
index f04c47e..2fa7fcc 100644
--- a/quilt/new.in
+++ b/quilt/new.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/next.in b/quilt/next.in
index 74ba4d2..f61f795 100644
--- a/quilt/next.in
+++ b/quilt/next.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/patches.in b/quilt/patches.in
index 6e1834b..82aeac8 100644
--- a/quilt/patches.in
+++ b/quilt/patches.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/pop.in b/quilt/pop.in
index 3ab2fac..d3dd77a 100644
--- a/quilt/pop.in
+++ b/quilt/pop.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/previous.in b/quilt/previous.in
index 45d4ce8..17d26be 100644
--- a/quilt/previous.in
+++ b/quilt/previous.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/push.in b/quilt/push.in
index 45becc9..9fe94a1 100644
--- a/quilt/push.in
+++ b/quilt/push.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/refresh.in b/quilt/refresh.in
index a7e5064..320b203 100644
--- a/quilt/refresh.in
+++ b/quilt/refresh.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/remove.in b/quilt/remove.in
index bea9baf..cc0960d 100644
--- a/quilt/remove.in
+++ b/quilt/remove.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/rest.in b/quilt/rest.in
index 6642fbb..bdacaa5 100755
--- a/quilt/rest.in
+++ b/quilt/rest.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/series.in b/quilt/series.in
index 7c10fad..c91e0eb 100644
--- a/quilt/series.in
+++ b/quilt/series.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/setup.in b/quilt/setup.in
index 3d2bee0..c4f8aff 100644
--- a/quilt/setup.in
+++ b/quilt/setup.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as
diff --git a/quilt/top.in b/quilt/top.in
index 84f6ba7..4e98a71 100644
--- a/quilt/top.in
+++ b/quilt/top.in
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@BASH@
# This script is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License version 2 as