void-packages

Void Source Packages
git clone git://ezup.dev/void-packages.git
Log | Files | Refs | README | LICENSE

mimedb (620B)


      1#!/bin/sh
      2#
      3# Updates the shared-mime-info db file with update-mime-database(1).
      4#
      5# Arguments:	$ACTION = [run/targets]
      6#		$TARGET = [post-install/post-remove]
      7#		$PKGNAME
      8#		$VERSION
      9#		$UPDATE = [yes/no]
     10#
     11ACTION="$1"
     12TARGET="$2"
     13PKGNAME="$3"
     14VERSION="$4"
     15UPDATE="$5"
     16
     17mimedb_bin=usr/bin/update-mime-database
     18
     19case "$ACTION" in
     20targets)
     21	echo "post-install post-remove"
     22	;;
     23run)
     24	case "$TARGET" in
     25	post-*)
     26		if [ ! -x ${mimedb_bin} ]; then
     27			exit 0
     28		fi
     29
     30		echo "Updating shared-mime-info database..."
     31		PKGSYSTEM_ENABLE_FSYNC=0 ${mimedb_bin} -n usr/share/mime > /dev/null
     32		;;
     33	esac
     34	;;
     35*)
     36	exit 1
     37	;;
     38esac
     39
     40exit 0