Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(306)

Side by Side Diff: scripts/xdg-mime.in

Issue 7453013: Bring xdg-utils up to date with upstream repository. (Closed) Base URL: http://src.chromium.org/svn/trunk/deps/third_party/xdg-utils/
Patch Set: '' Created 9 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « scripts/xdg-mime ('k') | scripts/xdg-open » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 #--------------------------------------------- 2 #---------------------------------------------
3 # xdg-mime 3 # xdg-mime
4 # 4 #
5 # Utility script to manipulate MIME related information 5 # Utility script to manipulate MIME related information
6 # on XDG compliant systems. 6 # on XDG compliant systems.
7 # 7 #
8 # Refer to the usage() function below for usage. 8 # Refer to the usage() function below for usage.
9 # 9 #
10 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> 10 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 exit_failure_operation_failed 90 exit_failure_operation_failed
91 fi 91 fi
92 } 92 }
93 93
94 info_generic() 94 info_generic()
95 { 95 {
96 if mimetype --version >/dev/null 2>&1; then 96 if mimetype --version >/dev/null 2>&1; then
97 DEBUG 1 "Running mimetype -b \"$1\"" 97 DEBUG 1 "Running mimetype -b \"$1\""
98 mimetype -b "$1" 98 mimetype -b "$1"
99 else 99 else
100 DEBUG 1 "Running file -i \"$1\"" 100 DEBUG 1 "Running file --mime-type \"$1\""
101 /usr/bin/file -i "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "// 101 /usr/bin/file --mime-type "$1" 2> /dev/null | cut -d ":" -f 2 | sed s/"^ "//
102 fi 102 fi
103 103
104 if [ $? -eq 0 ]; then 104 if [ $? -eq 0 ]; then
105 exit_success 105 exit_success
106 else 106 else
107 exit_failure_operation_failed 107 exit_failure_operation_failed
108 fi 108 fi
109 } 109 }
110 110
111 make_default_kde() 111 make_default_kde()
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after
862 rm -f $kde_dir/$x.desktop 862 rm -f $kde_dir/$x.desktop
863 fi 863 fi
864 done 864 done
865 ;; 865 ;;
866 esac 866 esac
867 867
868 update_mime_database $xdg_base_dir 868 update_mime_database $xdg_base_dir
869 869
870 exit_success 870 exit_success
871 871
OLDNEW
« no previous file with comments | « scripts/xdg-mime ('k') | scripts/xdg-open » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698