ssprasad | 954416c | 2021-10-29 00:08:28 +0530 | [diff] [blame^] | 1 | #!/bin/bash |
| 2 | # SPDX-FileCopyrightText: 2020 Efabless Corporation |
| 3 | # |
| 4 | # Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | # you may not use this file except in compliance with the License. |
| 6 | # You may obtain a copy of the License at |
| 7 | # |
| 8 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | # |
| 10 | # Unless required by applicable law or agreed to in writing, software |
| 11 | # distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | # See the License for the specific language governing permissions and |
| 14 | # limitations under the License. |
| 15 | # SPDX-License-Identifier: Apache-2.0 |
| 16 | |
| 17 | #!/bin/bash |
| 18 | |
| 19 | # : ${1?"Usage: $0 file.def pin_name new_name"} |
| 20 | # : ${2?"Usage: $0 file.def pin_name new_name"} |
| 21 | # : ${3?"Usage: $0 file.def pin_name new_name"} |
| 22 | |
| 23 | IFS=', ' read -r -a pin_name <<< $2 |
| 24 | IFS=', ' read -r -a new_name <<< $3 |
| 25 | |
| 26 | for i in "${!pin_name[@]}"; do |
| 27 | sed -i "s/${pin_name[i]}/${new_name[i]}/g" $1 |
| 28 | done |