[SCM] easytag/master: Script to automatically update the .mime file

umlaeute at users.alioth.debian.org umlaeute at users.alioth.debian.org
Fri Jun 19 20:19:06 UTC 2015


The following commit has been merged in the master branch:
commit 09ba110297a6be2f1e75325e546454ffa6a6ceee
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Fri Jun 19 22:18:43 2015 +0200

    Script to automatically update the .mime file

diff --git a/debian/update-mime.sh b/debian/update-mime.sh
new file mode 100755
index 0000000..e1a217d
--- /dev/null
+++ b/debian/update-mime.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+## this script extracts mime-types associated with easytag
+## (by looking at the desktop file), and creates a
+## <package>.mime file with these associations, but with
+## a lower priority.
+
+## this prevents easytag to take over associations for (e.g.)
+## directories (which it can handle, but in a rather unconventional way)
+
+
+INFILE=data/easytag.desktop.in
+OUTFILE=debian/easytag.mime
+
+filenotfound() {
+  echo "cannot find file '$1'" 1>&2
+  echo "run this script from the base-directory of easytag" 1>&2
+  exit 1
+}
+
+test -e "${INFILE}" || filenotfound "${INFILE}"
+test -e "${OUTFILE}" || filenotfound "${OUTFILE}"
+
+cat "${INFILE}" \
+	| egrep "^MimeType=" \
+	| sed -e 's|^MimeType=||' \
+	  -e 's|\([^;]*\);|\1; easytag %s; test=test -n "$DISPLAY"; priority=2\n|g' \
+	| grep . > "${OUTFILE}"

-- 
easytag packaging



More information about the pkg-multimedia-commits mailing list