3 find_duplicated_images_usage()
5 echo "Find duplicated images."
7 echo "Usage: $(basename ${0}) [options]"
11 echo " --help (-h) Print this help information and exit."
12 echo " --print (-p) List duplicated files. Default: OFF."
19 find_duplicated_images_main()
23 local where=$(readlink -f $(dirname "${0}"))
27 while getopts ":-:hp" option ${@}
29 if [ "${option}" = "-" ]
32 help ) find_duplicated_images_usage ;;
34 * ) echo "Wrong option: --${OPTARG}" > /dev/stderr ; exit 1 ;;
38 h ) find_duplicated_images_usage ;;
40 ? ) echo "Wrong option" > /dev/stderr ; exit 1 ;;
48 if [ "${verbose}" = "1" ]
51 for filename in $(find ${where} -type f -wholename "*/doc/*.png" -exec basename {} \; | sort | uniq -d)
53 find ${where} -type f -wholename "*/doc/*/${filename}"
57 result=$(find -type f -wholename "*/doc/*.png" -exec basename {} \; | sort | uniq -d | wc -l)
63 find_duplicated_images_main "${@}"