~ubuntu-dev/ubuntu/lucid/quilt/lucid-201002101907

« back to all changes in this revision

Viewing changes to quilt/fold.in

  • Committer: Bazaar Package Importer
  • Author(s): Raphaël Hertzog, Martin Quinson, Raphaël Hertzog, Ryan Niebur
  • Date: 2009-09-02 22:05:25 UTC
  • mfrom: (1.2.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 9.
  • Revision ID: james.westby@ubuntu.com-20090902220525-zhckxgbs9wqhyw83
[ Martin Quinson ]
* New upstream release.
* debian/patches/generic-awk: removed since merged upstream.
* debian/patches/*: updated so that they apply again on this release.

[ Raphaël Hertzog ]
* Remove Simon Hormans from Uploaders with his permission.
* debian/patches/fix-manpage-generation: fix Makefile so that
  the manual page is correctly generated with dash too (LP: #402237)
* Improve dh_quilt_patch/unpatch by respecting the QUILT_PATCH_DIR
  environment variable like /usr/share/quilt/quilt.make does.
  Closes: #544668

[ Ryan Niebur ]
* Add myself to Uploaders
* fixes to the arch_all patch to pass test suite
  - port upstream changes to the c version to the bash rewrite
    of backup-files
  - fix backup-files to process all files passed in on the
    command line instead of just the last (a clear bug)
* refresh all patches with -p ab
* add procmail to build deps, needed by tests
* Debian Policy 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
usage()
21
21
{
22
 
        printf $"Usage: quilt fold [-p strip-level]\n"
 
22
        printf $"Usage: quilt fold [-R] [-q] [-f] [-p strip-level]\n"
23
23
        if [ x$1 = x-h ]
24
24
        then
25
25
                printf $"
28
28
patch, the patch is applied with the specified strip level (which
29
29
defaults to 1).
30
30
 
 
31
-R      Apply patch in reverse.
 
32
 
 
33
-q      Quiet operation.
 
34
 
 
35
-f      Force apply, even if the patch has rejects. Unless in quiet mode,
 
36
        apply the patch interactively: the patch utility may ask questions.
 
37
 
31
38
-p strip-level
32
39
        The number of pathname components to strip from file names
33
40
        when applying patchfile.
39
46
        fi
40
47
}
41
48
 
42
 
options=`getopt -o p:qh -- "$@"`
 
49
options=`getopt -o Rp:qfh -- "$@"`
43
50
 
44
51
if [ $? -ne 0 ]
45
52
then
51
58
while true
52
59
do
53
60
        case "$1" in
 
61
        -R)
 
62
                opt_reverse=1
 
63
                shift ;;
 
64
        -f)
 
65
                opt_force=1
 
66
                shift ;;
54
67
        -p)
55
68
                opt_strip_level=$2
56
69
                shift 2 ;;
57
70
        -q)
58
 
                opt_silent=1
 
71
                opt_quiet=1
59
72
                shift ;;
60
73
        -h)
61
74
                usage -h ;;
71
84
fi
72
85
 
73
86
: ${opt_strip_level:=1}
74
 
[ -n "$opt_silent" ] && silent=-s
 
87
[ -n "$opt_quiet" ] && patch_args="$patch_args -s"
 
88
[ -z "$opt_force" -o -n "$opt_quiet" ] && patch_args="$patch_args -f"
 
89
[ -n "$opt_reverse" ] && patch_args="$patch_args -R"
75
90
 
76
91
top=$(find_top_patch) || exit 1
77
92
 
78
93
trap "failed=1" SIGINT
79
94
 
80
95
workdir=$(gen_tempfile -d $PWD)
81
 
patch -d ${SUBDIR:-.} $QUILT_PATCH_OPTS -p$opt_strip_level $silent \
82
 
      --backup --prefix="$workdir/$SUBDIR" -E \
 
96
patch -d ${SUBDIR:-.} $QUILT_PATCH_OPTS -p$opt_strip_level \
 
97
      --backup --prefix="$workdir/$SUBDIR" -E $patch_args \
83
98
|| failed=1
84
99
 
 
100
[ -n "$opt_force" ] && failed=
 
101
 
85
102
if [ -z "$failed" ]
86
103
then
87
104
        # Copy additional files from workdir to the backup directory