diff options
author | Bastien Nocera <hadess@hadess.net> | 2012-04-17 16:48:09 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2012-04-17 16:48:09 +0100 |
commit | b9a46707e3f1e705110499e286ca1daa8923339e (patch) | |
tree | 850a54c04c20793cd9cdd151cfcda024c37de2c6 /data | |
parent | a869ef65dd329fd9e4a4896c303fc018b8824c88 (diff) | |
download | totem-b9a46707e3f1e705110499e286ca1daa8923339e.tar.gz |
data: Add script to generate a javascript header
Diffstat (limited to 'data')
-rw-r--r-- | data/Makefile.am | 4 | ||||
-rwxr-xr-x | data/mime-type-imports.sh | 19 |
2 files changed, 22 insertions, 1 deletions
diff --git a/data/Makefile.am b/data/Makefile.am index 6dcab8183..473647a1a 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -82,11 +82,13 @@ CLEANFILES += \ $(thumbnailer_DATA) # Content type handling -nodist_noinst_HEADERS = totem-mime-types.h nautilus-audio-mime-types.h totem-uri-schemes.h +nodist_noinst_HEADERS = totem-mime-types.h nautilus-audio-mime-types.h totem-uri-schemes.h totem-mime-types.js totem-mime-types.h: mime-type-include.sh mime-type-list.txt mime-functions.sh $(AM_V_GEN) $(srcdir)/mime-type-include.sh $(srcdir)/mime-type-list.txt > $@ nautilus-audio-mime-types.h: mime-type-include.sh mime-type-list.txt mime-functions.sh $(AM_V_GEN) $(srcdir)/mime-type-include.sh --nautilus $(srcdir)/mime-type-list.txt > $@ +totem-mime-types.js: mime-type-imports.sh mime-type-list.txt mime-functions.sh + $(AM_V_GEN) $(srcdir)/mime-type-imports.sh $(srcdir)/mime-type-list.txt > $@ totem-uri-schemes.h: mime-type-include.sh mime-type-list.txt mime-functions.sh $(AM_V_GEN) $(srcdir)/uri-scheme-include.sh $(srcdir)/uri-schemes-list.txt > $@ diff --git a/data/mime-type-imports.sh b/data/mime-type-imports.sh new file mode 100755 index 000000000..57d8e4016 --- /dev/null +++ b/data/mime-type-imports.sh @@ -0,0 +1,19 @@ +#!/bin/sh + +. `dirname $0`/mime-functions.sh + +echo_mime () { + echo " \"$i\"," +} + +MIMETYPES=`grep -v '^#' $1 | grep -v x-content/ | grep -v x-scheme-handler/` + +echo "/* generated with mime-type-imports.sh in the totem module, don't edit or" +echo " commit in the sushi module without filing a bug against totem */" + +echo "let videoTypes = [" +for i in $MIMETYPES ; do + echo_mime; +done +echo "];" + |