repo.or.cz
/
sm64pc.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Merge pull request #438 from s4Ys369/revert-434-patch-1
[sm64pc.git]
/
tools
/
revert_patch.sh
blob
af19abda7f36dd86f6dabab102b921612c4d4d36
1
#!/bin/sh
2
#
3
# revert_patch.sh - Reverts an enhancement patch
4
#
5
6
if
[
"
$#
"
-ne
1
]
7
then
8
echo
"Usage:
$0
patch_file"
9
echo
' Reverts the changes made by an enhancement patch'
10
exit
1
11
fi
12
13
read -p
"Do you wish to revert the patch '
$1
'? [Y/N] "
response
14
case
"
$response
"
in
15
Y|y
)
16
patch
-p1 -R
<
"
$1
"
17
;;
18
N|n
)
19
echo
'Quit'
20
exit
1
21
;;
22
*)
23
echo
"Invalid response '
$response
'."
24
exit
1
25
;;
26
esac
27
28