blob: af19abda7f36dd86f6dabab102b921612c4d4d36 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!/bin/sh
#
# revert_patch.sh - Reverts an enhancement patch
#
if [ "$#" -ne 1 ]
then
echo "Usage: $0 patch_file"
echo ' Reverts the changes made by an enhancement patch'
exit 1
fi
read -p "Do you wish to revert the patch '$1'? [Y/N] " response
case "$response" in
Y|y)
patch -p1 -R < "$1"
;;
N|n)
echo 'Quit'
exit 1
;;
*)
echo "Invalid response '$response'."
exit 1
;;
esac
|