Remove lnk files from desktop because they don't work anyway.
This commit is contained in:
parent
829ad08a7b
commit
7acc3e0f35
@ -200,6 +200,15 @@ add_launcher() {
|
|||||||
if ! grep -F -q -x "${launchSettings}" "${configFile}" ; then
|
if ! grep -F -q -x "${launchSettings}" "${configFile}" ; then
|
||||||
echo "${launchSettings}" >> "${configFile}"
|
echo "${launchSettings}" >> "${configFile}"
|
||||||
sort -o "${configFile}" "${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
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user