summaryrefslogtreecommitdiff
path: root/rename_sym.sh
blob: d5744d2a070d67447147831477396239c9f40b23 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/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
grep -rl "$1" asm/**/*.s data/*.s src/**/*.c src/audio/*.c src/**/*.h src/os/*.{c,h} courses/**/*.{c,h} undefined_syms.txt | xargs sed -i "s/\b$1\b/$2/g"