BlinkenArea - GitList
Repositories
Blog
Wiki
partlib
Code
Commits
Branches
Tags
Search
Tree:
cd92b87
Branches
Tags
master
stefan.experimental
partlib
pcb_stuff
pcb_set_clearance.sh
move scripts into own subdir
Stefan Schuermans
commited
cd92b87
at 2014-01-11 13:44:27
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"' /'