sm64pc/rename_sym.sh

14 lines
377 B
Bash
Raw Normal View History

2019-08-25 04:46:40 +00:00
#!/bin/bash
shopt -s globstar
if [ "$#" -ne "2" ];
then
echo "usage: $0 old_name new_name"
exit 1
fi
#echo "Replace $1 with $2?"
#read
2019-12-02 02:52:53 +00:00
grep -rl "$1" text/**/*.{c,h} assets/**/*.c enhancements/**/*.{c,h,s} lib/**/*.{c,h,s} asm/**/*.s bin/**/*.c data/*.c levels/**/*.c actors/**/*.c src/**/*.{c,h} include/**/*.{h,in} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"