mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice-protocol
synced 2026-08-07 14:18:49 +00:00
Add utility script to do C identifier renaming
This commit is contained in:
parent
9032d5235b
commit
cb5909696b
9
rename-identifiers.sh
Executable file
9
rename-identifiers.sh
Executable file
@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
SEDFILE=`mktemp`
|
||||
|
||||
awk '$0 !~ /^#.*/ && (NF == 2) { print "s/\\(^\\|[^A-Za-z_]\\)\\(" $1 "\\)\\($\\|[^A-Za-z0-9_]\\)/\\1" $2 "\\3/g" }' $1 > $SEDFILE
|
||||
|
||||
shift
|
||||
sed -f $SEDFILE -i $*
|
||||
rm $SEDFILE
|
||||
Loading…
Reference in New Issue
Block a user