Skip to content

Commit

Permalink
PR #273: [git] Source diff awk file with absolute path
Browse files Browse the repository at this point in the history
git-verilog_format.sh uses the script directory to source diff awk file.
If the script is called with relative path it cannot source the file
correctly as the tool change the directory to the repository top.

This commit is to change the path to absolute path so that wherever the
script is called inside repo top, it can source the awk file.

GitHub PR #273

Copybara import of the project:

  - 82b552d [git] Source diff awk file with absolute path by Eunchan Kim <[email protected]>

Closes #273
issues #206

PiperOrigin-RevId: 307860502
  • Loading branch information
Eunchan Kim authored and hzeller committed Apr 22, 2020
1 parent bc6e7dd commit 47f3270
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion verilog/tools/formatter/git-verilog_format.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# limitations under the License.

script_name="$(basename $0)"
script_dir="$(dirname $0)"
script_dir="$(realpath $(dirname $0))"

formatter="$(which verilog_format)" || \
formatter="$script_dir"/verilog_format
Expand Down

0 comments on commit 47f3270

Please sign in to comment.