File: mime-type-include.sh

package info (click to toggle)
totem 3.38.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 13,900 kB
  • sloc: ansic: 31,046; python: 1,212; makefile: 228; xml: 191; sh: 151
file content (56 lines) | stat: -rwxr-xr-x 1,024 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#!/bin/sh

. `dirname $0`/mime-functions.sh

echo_mime () {
	echo "\"$i\","
}

if [ x"$1" = "x--nautilus" ] ; then
	get_video_mimetypes $2;

	echo "/* generated with mime-type-include.sh in the totem module, don't edit or"
	echo "   commit in the nautilus module without filing a bug against totem */"

	echo "G_GNUC_UNUSED static const char *video_mime_types[] = {"
	for i in $MIMETYPES ; do
		echo_mime;
	done

	echo "NULL"
	echo "};"

	exit 0
fi

MIMETYPES=`grep -v '^#' $1 | grep -v x-content/ | grep -v x-scheme-handler/`

echo "/* generated with mime-types-include.sh, don't edit */"
echo "G_GNUC_UNUSED static const gchar *mime_types[] = {"

for i in $MIMETYPES ; do
	echo_mime;
done

echo "NULL"
echo "};"

get_audio_mimetypes $1;

echo "G_GNUC_UNUSED static const gchar *audio_mime_types[] = {"
for i in $MIMETYPES ; do
	echo_mime;
done

echo "NULL"
echo "};"

get_video_mimetypes $1;

echo "G_GNUC_UNUSED static const gchar *video_mime_types[] = {"
for i in $MIMETYPES ; do
	echo_mime;
done

echo "NULL"
echo "};"