Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/tools/apply_patch.sh
7854 views
1
#!/bin/sh
2
#
3
# apply_patch.sh - Applies an enhancement patch
4
#
5
6
if [ "$#" -ne 1 ]
7
then
8
echo "Usage: $0 patch_file"
9
echo ' Applies a patch file to the current directory'
10
exit 1
11
fi
12
13
read -p "Do you wish to apply the patch '$1'? [Y/N] " response
14
case "$response" in
15
Y|y)
16
patch -p1 < "$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
29