haiku/data/common/boot/post_install/mime_update.sh
Jonas Sundström 72813d6ebd This should improve the first boot user experience by mimesetting the files on the desktop before mimesetting anything else. Please review.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@32445 a95241bf-73f2-0310-859d-f6bbb57e9c96
2009-08-16 17:09:03 +00:00

22 lines
509 B
Bash
Executable File

#!/bin/sh
# Make sure files on the desktop are mimeset first
for f in $(/bin/finddir B_DESKTOP_DIRECTORY 2>/dev/null\
|| echo "/boot/home/Desktop")/*; do
if [ -f $f ]; then
mimeset -apps -f $f
fi
done
# Make sure all apps have a MIME DB entry.
SYSTEM=$(/bin/finddir B_SYSTEM_DIRECTORY 2>/dev/null || echo "/boot/system")
mimeset -apps -f "$SYSTEM/apps"
mimeset -f "$SYSTEM/documentation"
mimeset -apps -f "$SYSTEM/preferences"
mimeset -apps -f "$SYSTEM/servers"
mimeset -apps -f "/boot/apps"