Remove lnk files from desktop because they don't work anyway.

This commit is contained in:
Storm Dragon 2020-09-05 12:37:10 -04:00
parent 829ad08a7b
commit 7acc3e0f35

View File

@ -200,6 +200,15 @@ add_launcher() {
if ! grep -F -q -x "${launchSettings}" "${configFile}" ; then
echo "${launchSettings}" >> "${configFile}"
sort -o "${configFile}" "${configFile}"
# Remove .lnk files because they don't work.
find ~/Desktop -type f -iname '*.lnk' -exec bash -c '
for f ; do
mimeType="$(file -b "$f")"
mimeType="${mimeType%%,*}"
if [[ "$mimeType" == "MS Windows shortcut" ]]; then
rm -v "$f"
fi
done' _ {} +
fi
}