Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
MorsGames
GitHub Repository: MorsGames/sm64plus
Path: blob/master/rename_sym.sh
7851 views
1
#!/bin/bash
2
3
shopt -s globstar
4
5
if [ "$#" -ne "2" ];
6
then
7
echo "usage: $0 old_name new_name"
8
exit 1
9
fi
10
11
#echo "Replace $1 with $2?"
12
#read
13
grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/*.patch lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.{c,h} actors/**/*.{c,h} src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"
14
15