Rev 29 | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 29 | Rev 36 | ||
---|---|---|---|
1 | #!/bin/sh |
1 | #!/bin/sh |
2 | ## 35_untabify_help.dpatch by Magnus Holmgren <magnus@kibibyte.se> |
2 | ## 35_untabify_help.dpatch by Magnus Holmgren <magnus@kibibyte.se> |
3 | ## |
3 | ## |
4 | ## All lines beginning with `## DP:' are a description of the patch. |
4 | ## All lines beginning with `## DP:' are a description of the patch. |
5 | ## DP: Tidy up --help messages by converting tabs to four spaces (" "). |
5 | ## DP: Tidy up --help messages by converting tabs to four spaces (" "). |
6 | 6 | ||
7 | FILES_TO_PROCESS="src/spfquery/spfquery.c |
7 | FILES_TO_PROCESS="src/spfquery/spfquery.c |
8 | src/spftest/spftest.c |
8 | src/spftest/spftest.c |
9 | src/spf_example/spf_example.c" |
9 | src/spf_example/spf_example.c" |
10 | 10 | ||
11 | dpatch_patch() { |
11 | dpatch_patch() { |
12 | # Change line endings to LF in files with CRLF |
12 | # Change line endings to LF in files with CRLF |
13 | perl -pi -e 's/("[^"]*?)\t/$1 / and redo;' $FILES_TO_PROCESS |
13 | perl -pi -e 's/("[^"]*?)\t/$1 / and redo;' $FILES_TO_PROCESS |
14 | } |
14 | } |
15 | 15 | ||
16 | dpatch_unpatch() { |
16 | dpatch_unpatch() { |
17 | # Change line endings back to CRLF in files that had it in the tarball |
17 | # Change line endings back to CRLF in files that had it in the tarball |
18 | # Unfortunately there are exceptions ... have to watch out for changes |
18 | # Unfortunately there are exceptions ... have to watch out for changes |
19 | # in future upstream versions (or simply make backups instead). |
19 | # in future upstream versions (or simply make backups instead). |
20 | perl -pi -e 's/("[^"]*?) /$1\t/ and redo;' $FILES_TO_PROCESS |
20 | perl -pi -e 's/("[^"]*?) /$1\t/ and redo;' $FILES_TO_PROCESS |
21 | } |
21 | } |
22 | 22 | ||
23 | DPATCH_LIB_NO_DEFAULT=1 |
23 | DPATCH_LIB_NO_DEFAULT=1 |
24 | 24 | ||
25 | . /usr/share/dpatch/dpatch.lib.sh |
25 | . /usr/share/dpatch/dpatch.lib.sh |