Skip to content

Commit d102a22

Browse files
authored
Merge pull request #267 from Schlossgeist/master
add option to patch files with --binary
2 parents 9dad7ac + d172aa4 commit d102a22

1 file changed

Lines changed: 7 additions & 4 deletions

File tree

classes/patch.yaml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ checkoutDeterministic: True
22
checkoutSetup: |
33
patchApplySeries()
44
{
5-
local i p=1 fuzz=0 name=""
5+
local i p=1 fuzz=0 name="" b=""
66
77
# parse arguments
88
OPTIND=1
99
local opt
10-
while getopts "n:p:F:" opt ; do
10+
while getopts "n:p:F:b" opt ; do
1111
case "$opt" in
1212
n)
1313
name="-$OPTARG"
@@ -18,6 +18,9 @@ checkoutSetup: |
1818
p)
1919
p="$OPTARG"
2020
;;
21+
b)
22+
b="--binary"
23+
;;
2124
\?)
2225
echo "Invalid option: -$OPTARG" >&2
2326
exit 1
@@ -76,8 +79,8 @@ checkoutSetup: |
7679
p; q # one is enough
7780
}' "$fn" )"
7881
subject="$(printf "%04d-%s.patch" $i "$subject")"
79-
patch --dry-run -p $p -F $fuzz -f < "$fn"
80-
patch -p $p -F $fuzz -f < "$fn"
82+
patch $b --dry-run -p $p -F $fuzz -f < "$fn"
83+
patch $b -p $p -F $fuzz -f < "$fn"
8184
cp "$fn" "$name/$subject"
8285
echo "$subject" >> "$name/series"
8386
done

0 commit comments

Comments
 (0)