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

Side by Side Diff: scripts/xdg-desktop-menu.in

Issue 6735024: Linux: update xdg-utils again, and check in the built versions of the scripts. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xdg-utils/
Patch Set: Created 9 years, 8 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-desktop-menu ('k') | scripts/xdg-email » ('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-desktop-menu 3 # xdg-desktop-menu
4 # 4 #
5 # Utility script to install menu items on a Linux desktop. 5 # Utility script to install menu items on a Linux desktop.
6 # Refer to the usage() function below for usage. 6 # Refer to the usage() function below for usage.
7 # 7 #
8 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> 8 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
9 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> 9 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
10 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> 10 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 DEBUG 2 "Found default apps for $MIME: $default_app" 81 DEBUG 2 "Found default apps for $MIME: $default_app"
82 default_app="$default_app;" 82 default_app="$default_app;"
83 break; 83 break;
84 fi 84 fi
85 done 85 done
86 DEBUG 2 "Current default apps for $MIME: $default_app" 86 DEBUG 2 "Current default apps for $MIME: $default_app"
87 if echo "$default_app" | grep "$2" > /dev/null 2> /dev/null; then 87 if echo "$default_app" | grep "$2" > /dev/null 2> /dev/null; then
88 # App already listed as default 88 # App already listed as default
89 continue; 89 continue;
90 fi 90 fi
91 default_file="$1/defaults.list" 91 default_file="$(readlink -f "$1/defaults.list")"
92 DEBUG 1 "Updating $default_file" 92 DEBUG 1 "Updating $default_file"
93 grep -v "$MIME=" $default_file > ${default_file}.new 2> /dev/null 93 grep -v "$MIME=" $default_file > ${default_file}.new 2> /dev/null
94 if ! grep "[Default Applications]" ${default_file}.new > /dev/null; then 94 if ! grep "[Default Applications]" ${default_file}.new > /dev/null; then
95 echo "[Default Applications]" >> ${default_file}.new 95 echo "[Default Applications]" >> ${default_file}.new
96 fi 96 fi
97 echo $MIME="$default_app$2" >> ${default_file}.new 97 echo $MIME="$default_app$2" >> ${default_file}.new
98 mv ${default_file}.new $default_file 98 mv ${default_file}.new $default_file
99 done 99 done
100 } 100 }
101 101
(...skipping 517 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 619
620 ;; 620 ;;
621 esac 621 esac
622 done 622 done
623 623
624 if [ x"$update" = x"yes" ] ; then 624 if [ x"$update" = x"yes" ] ; then
625 update_desktop_database 625 update_desktop_database
626 fi 626 fi
627 627
628 exit_success 628 exit_success
OLDNEW
« no previous file with comments | « scripts/xdg-desktop-menu ('k') | scripts/xdg-email » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698