Merge pull request #438 from s4Ys369/revert-434-patch-1
[sm64pc.git] / tools / revert_patch.sh
blobaf19abda7f36dd86f6dabab102b921612c4d4d36
1 #!/bin/sh
3 # revert_patch.sh - Reverts an enhancement patch
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
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"
18 N|n)
19 echo 'Quit'
20 exit 1
23 echo "Invalid response '$response'."
24 exit 1
26 esac