blob: b1bf249f3a89c8c8c692292af2b20097077d9a17 [file] [log] [blame] [edit]
#!/bin/sh
# Copyright (c) Efabless Corporation. All rights reserved.
# See LICENSE file in the project root for full license information.
if [[ $# -lt 1 ]]; then
echo "usage ./remove_pins.sh file.def"
exit
fi
file=$1
# remove the PINS section
sed -ie "/PINS.*;/,/END PINS/d" $file
# remove extra \ characters
sed -ie "s/[\\]//g" $file
# remove ( PIN xxx ) in the nets section
sed -ie "s/(\sPIN\s[^[:space:]]*\s)\s//g" $file
# remove empty nets
sed -ie "/NETS/,/END NETS/ s/^-\s.[^[:space:]]\+\s\+;$//g" $file