mirror of
https://github.com/trezor/trezor-suite.git
synced 2026-03-20 22:28:30 +01:00
17 lines
447 B
Bash
Executable File
17 lines
447 B
Bash
Executable File
# this script finds duplicated files in project per provided extension
|
|
|
|
# $1 should contain path such as ./packages/suite-data/files
|
|
# $2 should contain file extension such as .png
|
|
|
|
result=$(find $1 -name *$2 ! -path "**/node_modules/*" ! -empty -type f -exec md5sum {} + | sort | uniq -w32 -dD)
|
|
|
|
|
|
if [ -z "$result" ]
|
|
then
|
|
echo "no duplicates for ${2}"
|
|
else
|
|
echo "duplicates found"
|
|
echo $result | tr "$2 " "$2\n"
|
|
exit 1
|
|
fi
|