1#! /bin/sh -e 2# SPDX-License-Identifier: BSD-3-Clause 3# Copyright 2020 Mellanox Technologies, Ltd 4 5# Build a spelling dictionary suitable for DPDK_CHECKPATCH_CODESPELL 6 7# path to local clone of https://github.com/codespell-project/codespell.git 8codespell_path=$1 9dic_path=$codespell_path/codespell_lib/data 10if [ ! -d "$dic_path" ]; then 11 echo "Usage: $0 <path_to_codespell_project>" >&2 12 exit 1 13fi 14 15# concatenate codespell dictionaries, except GB/US one 16for suffix in .txt _code.txt _informal.txt _names.txt _rare.txt _usage.txt ; do 17 cat $dic_path/dictionary$suffix 18done | 19 20# remove too short or wrong checks 21sed '/^..->/d' | 22sed '/^uint->/d' | 23sed "/^doesn'->/d" | 24sed '/^wasn->/d' | 25sed '/^stdio->/d' | 26sed '/^soring->/d' | 27 28# print to stdout 29cat 30