xs/fixup-gv.sh
2018-11-25 18:43:53 -08:00

9 lines
229 B
Bash
Executable file

#!/bin/bash
inFile="${1/.go/}"
visFile="${inFile}-vis.gv"
#grep -o "\.[a-zA-Z_]*\$[0-9]*" "$inFile"-vis.gv | sort | uniq
grep -o "#gv:.*" "$inFile.go" | cut -f2 -d: | \
while read -r expr; do sed -i ${expr} "${visFile}"; done