IconToaster/missing.sh

32 lines
986 B
Bash
Executable File

#! /bin/bash
# this file is part of missing-icon-reporter
# and it's AGPLv3 licensed.
desktopsearch () {
for DESKTOP in /usr/share/applications/*.desktop
do
if [[ -f "${DESKTOP}" ]]; then
cat ${DESKTOP} | grep 'Icon=' | sed s/Icon=//
fi
done
}
iconsearch () {
for ICON in ~/.icons/aleta/*/*/*.png
do
if [[ -f "${ICON}" ]]; then
N=$(basename ${ICON} .png)
echo ${N}
fi
done
}
desktopsearch | sort | uniq > /tmp/.missing-icon-reporter-desktopsearch.tmp
iconsearch | sort | uniq > /tmp/.missing-icon-reporter-iconsearch.tmp
cat /tmp/.missing-icon-reporter-desktopsearch.tmp /tmp/.missing-icon-reporter-iconsearch.tmp | sort | uniq > /tmp/.missing-icon-reporter-comparisonsearch.tmp
cat /tmp/.missing-icon-reporter-comparisonsearch.tmp /tmp/.missing-icon-reporter-iconsearch.tmp /tmp/.missing-icon-reporter-iconsearch.tmp | sort | uniq
# diff --suppress-common-lines /tmp/.missing-icon-reporter-desktopsearch.tmp /tmp/.missing-icon-reporter-iconsearch.tmp