BlinkenArea - GitList
Repositories
Blog
Wiki
partlib
Code
Commits
Branches
Tags
Search
Tree:
8c1680e
Branches
Tags
master
stefan.experimental
partlib
pcb_set_clearance.sh
initial commit
Stefan Schuermans
commited
8c1680e
at 2012-10-03 10:15:25
pcb_set_clearance.sh
Blame
History
Raw
#! /bin/sh if (( $# < 1 )) then echo "usage: $0 <clearance>" >&2 exit 1 fi CLEARANCE=$1 CLEARANCE_HALF=$[CLEARANCE/2] sed \ 's/Styles\["Signal,\([-0-9]\+\),\([-0-9]\+\),\([-0-9]\+\),[-0-9]\+:/Styles["Signal,\1,\2,\3,'"$CLEARANCE_HALF"':/;'\ 's/Styles\["\(.*\):Power,\([-0-9]\+\),\([-0-9]\+\),\([-0-9]\+\),[-0-9]\+:/Styles["\1:Power,\2,\3,\4,'"$CLEARANCE_HALF"':/;'\ 's/Styles\["\(.*\):Fat,\([-0-9]\+\),\([-0-9]\+\),\([-0-9]\+\),[-0-9]\+:/Styles["\1:Fat,\2,\3,\4,'"$CLEARANCE_HALF"':/;'\ 's/Styles\["\(.*\):Skinny,\([-0-9]\+\),\([-0-9]\+\),\([-0-9]\+\),[-0-9]\+"/Styles["\1:Skinny,\2,\3,\4,'"$CLEARANCE_HALF"'"/;'\ 's/Via\[\([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) [1-9][0-9]* /Via[\1 \2 \3 '"$CLEARANCE"' /;'\ 's/Line\[\([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) [1-9][0-9]* /Line[\1 \2 \3 \4 \5 '"$CLEARANCE"' /;'\ 's/Pin\[\([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) [1-9][0-9]* /Pin[\1 \2 \3 '"$CLEARANCE"' /;'\ 's/Pad\[\([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) \([-0-9]\+\) [1-9][0-9]* /Pad[\1 \2 \3 \4 \5 '"$CLEARANCE"' /'