[devscripts] 04/05: mergechanges: Add -d option to delete input files
James McCoy
jamessan at debian.org
Wed Jun 10 03:34:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
jamessan pushed a commit to branch master
in repository devscripts.
commit 84e0a66e34ec8be7c8153f79b07e0af632bd5300
Author: James McCoy <jamessan at debian.org>
Date: Tue Jun 9 22:55:05 2015 -0400
mergechanges: Add -d option to delete input files
Signed-off-by: James McCoy <jamessan at debian.org>
---
debian/changelog | 3 +++
scripts/mergechanges.1 | 8 ++++++--
scripts/mergechanges.sh | 11 ++++++++++-
3 files changed, 19 insertions(+), 3 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 58bfd69..cc00589 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -43,6 +43,9 @@ devscripts (2.15.5) UNRELEASED; urgency=medium
+ Verify build-dep package was installed since the install tool may exit
successfully even if the package couldn't be installed. Based on a
patch by Dima Kogan. (Closes: #755371)
+ * mergechanges:
+ + Add -d option to delete input files on success. Thanks to Mark Hymers
+ for the patch. (Closes: #640068)
[ Dominique Dumont ]
* licensecheck:
diff --git a/scripts/mergechanges.1 b/scripts/mergechanges.1
index e68b587..f6253fa 100644
--- a/scripts/mergechanges.1
+++ b/scripts/mergechanges.1
@@ -2,7 +2,7 @@
.SH NAME
mergechanges \- merge multiple changes files
.SH SYNOPSIS
-\fBmergechanges\fR [\fB\-f\fR] [\fB\-i\fR] \fIfile1 file2\fR [\fIfile\fR...]
+\fBmergechanges\fR [\fB\-d\fR] [\fB\-f\fR] [\fB\-i\fR] \fIfile1 file2\fR [\fIfile\fR...]
.SH DESCRIPTION
\fBmergechanges\fR merges two or more \fI.changes\fR files, merging
the Architecture, Description and Files (and Checksums-*, if present)
@@ -16,11 +16,15 @@ option is given, the output is written to
\fIpackage\fR_\fIversion\fR_multi.changes instead, in the same
directory as the first changes file listed.
.PP
+If the \fB\-d\fR option is given and the output is generated successfully, the
+input files will be deleted.
+.PP
If the \fB\-i\fR or \fB\-\-indep\fR option is given, source packages
and architecture-independent (Architecture: all) packages are included
in the output, but architecture-dependent packages are not.
.SH AUTHOR
Gergely Nagy <algernon at debian.org>,
modifications by Julian Gilbey <jdg at debian.org>,
-Adam D. Barratt <adam at adam-barratt.org.uk> and
+Mark Hymers <mhy at debian.org>,
+Adam D. Barratt <adam at adam-barratt.org.uk>, and
Simon McVittie <smcv at debian.org>.
diff --git a/scripts/mergechanges.sh b/scripts/mergechanges.sh
index 0cf4526..86a1747 100755
--- a/scripts/mergechanges.sh
+++ b/scripts/mergechanges.sh
@@ -24,7 +24,7 @@ set -e
PROGNAME=`basename $0`
synopsis () {
- echo "Usage: $PROGNAME [-h|--help|--version] [-i|--indep] [-f] <file1> <file2> [<file> ...]"
+ echo "Usage: $PROGNAME [-h|--help|--version] [-d] [-i|--indep] [-f] <file1> <file2> [<file> ...]"
}
usage () {
@@ -50,6 +50,7 @@ GNU General Public License, version 2 or later."
# Commandline parsing
FILE=0
+DELETE=0
INDEP_ONLY=0
while [ $# -gt 0 ]; do
@@ -66,6 +67,10 @@ while [ $# -gt 0 ]; do
FILE=1
shift
;;
+ -d)
+ DELETE=1
+ shift
+ ;;
-i|--indep)
INDEP_ONLY=1
shift
@@ -261,4 +266,8 @@ fi
eval "echo 'Files: ' ${REDIR2}"
eval "echo '${FILES}' ${REDIR2}"
+if test ${DELETE} = 1; then
+ rm "$@"
+fi
+
exit 0
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/devscripts.git
More information about the devscripts-devel
mailing list