[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Quilt-dev] [PATCH 06/39] backup-files: Drop suffix option
From: |
Jean Delvare |
Subject: |
[Quilt-dev] [PATCH 06/39] backup-files: Drop suffix option |
Date: |
Sat, 19 Mar 2011 10:52:36 +0100 |
User-agent: |
quilt/0.48-17.1 |
Quilt doesn't make use of the suffix (-z) option of backup-files, so
there is no point in implementing it
Signed-off-by: Jean Delvare <address@hidden>
Reviewed-by: Raphael Hertzog <address@hidden>
---
quilt/scripts/backup-files.in | 20 ++++----------------
1 file changed, 4 insertions(+), 16 deletions(-)
--- a/quilt/scripts/backup-files.in
+++ b/quilt/scripts/backup-files.in
@@ -24,12 +24,11 @@ set -e
# Create backup files of a list of files similar to GNU patch. A path
-# name prefix and suffix for the backup file can be specified with the
-# -B and -z options.
+# name prefix for the backup files must be specified with the -B option.
usage () {
local progname="$1"
- echo "Usage: $progname [-B prefix] [-z suffix] [-f {file|-}] [-s] [-k]
[-t] [-L] [-b|-r|-x] {file|-} ...
+ echo "Usage: $progname [-B prefix] [-f {file|-}] [-s] [-k] [-t] [-L]
[-b|-r|-x] {file|-} ...
Create hard linked backup copies of a list of files
read from standard input.
@@ -39,7 +38,6 @@ usage () {
-x Remove backup files and empty parent directories
-k When doing a restore, keep the backup files
-B Path name prefix for backup files
- -z Path name suffix for backup files
-s Silent operation; only print error messages
-f Read the filenames to process from file (- = standard input)
-t Touch original files after restore (update their mtimes)
@@ -79,7 +77,7 @@ ensure_nolinks() {
process_file() {
local file="$1"
- local backup="${OPT_PREFIX}${file}${OPT_SUFFIX}"
+ local backup="${OPT_PREFIX}${file}"
if [ "$OPT_WHAT" == "backup" ]; then
if [ -e "$backup" ]; then
@@ -168,13 +166,6 @@ walk() {
fi
path="${path#$OPT_PREFIX}"
- if [ -n "$OPT_SUFFIX" ] && [ "${path%$OPT_SUFFIX}" == "$path" ]
- then
- # suffix does not match
- return 0
- fi
- path="${path%$OPT_SUFFIX}"
-
process_file "$path"
}
@@ -196,9 +187,6 @@ while [ $# -gt 0 ]; do
-f) OPT_FILE=$2
shift
;;
- -z) OPT_SUFFIX=$2
- shift
- ;;
-s) ECHO=:
;;
-k) OPT_KEEP_BACKUP=1
@@ -218,7 +206,7 @@ while [ $# -gt 0 ]; do
shift
done
-if [ -z "${OPT_PREFIX}${OPT_SUFFIX}" ]; then
+if [ -z "$OPT_PREFIX" ]; then
usage "$progname"
exit 1
fi
- [Quilt-dev] [PATCH 17/39] backup-files: Drop variable filelist, (continued)
- [Quilt-dev] [PATCH 17/39] backup-files: Drop variable filelist, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 09/39] backup-files: Inline copy_file and link_or_copy_file, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 19/39] backup-files: Use internal implementation of dirname, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 33/39] backup-files: Try mass copy first on copy, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 05/39] Clean up legacy C code, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 11/39] backup-files: Prefix must be a directory, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 30/39] backup-files: Skip first mkdir on restore, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 29/39] backup-files: Try mass link/copy first on restore, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 36/39] backup-files: Drop support for -L on restore, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 16/39] backup-files: Optimize backup, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 06/39] backup-files: Drop suffix option,
Jean Delvare <=
- [Quilt-dev] [PATCH 28/39] backup-files: Separate lists for empty and non-empty files, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 10/39] backup-files: Speed up ensure_nolinks, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 35/39] backup-files: Inline restore_fast, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 20/39] backup-files: Batch mass restore, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 31/39] backup-files: New function for copy, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 37/39] backup-files: Drop support for backup removal, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 08/39] backup-files: Drop variable progname, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 04/39] BSD compatibility: rmdir, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 32/39] backup-files: Separate function copy_many, Jean Delvare, 2011/03/19
- [Quilt-dev] [PATCH 39/39] backup-files: Skip echo-only loops in silent mode, Jean Delvare, 2011/03/19