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

Side by Side Diff: chrome/installer/linux/common/postinst.include

Issue 1111113002: Linux: Correct the path to gnome-default-applications.xml. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « chrome/installer/linux/common/default-app.template ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Add icons to the system icons 1 # Add icons to the system icons
2 XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`" 2 XDG_ICON_RESOURCE="`which xdg-icon-resource 2> /dev/null || true`"
3 if [ ! -x "$XDG_ICON_RESOURCE" ]; then 3 if [ ! -x "$XDG_ICON_RESOURCE" ]; then
4 echo "Error: Could not find xdg-icon-resource" >&2 4 echo "Error: Could not find xdg-icon-resource" >&2
5 exit 1 5 exit 1
6 fi 6 fi
7 for icon in "@@INSTALLDIR@@/product_logo_"*.png; do 7 for icon in "@@INSTALLDIR@@/product_logo_"*.png; do
8 size="${icon##*/product_logo_}" 8 size="${icon##*/product_logo_}"
9 "$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "@@PACKAGE@@" 9 "$XDG_ICON_RESOURCE" install --size "${size%.png}" "$icon" "@@PACKAGE@@"
10 done 10 done
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 # matching line, then the file is unchanged. 56 # matching line, then the file is unchanged.
57 insert_after_first_match() { 57 insert_after_first_match() {
58 # $1: file to update 58 # $1: file to update
59 # $2: regular expression 59 # $2: regular expression
60 # $3: file to insert 60 # $3: file to insert
61 sed -i -e "1,/$2/ { 61 sed -i -e "1,/$2/ {
62 /$2/ r $3 62 /$2/ r $3
63 }" "$1" 63 }" "$1"
64 } 64 }
65 65
66 # If /usr/share/gnome-control-center/gnome-default-applications.xml exists, it 66 # If /usr/share/gnome-control-center/default-apps/gnome-default-applications.xml
67 # may need to be updated to add ourselves to the default applications list. If 67 # exists, it may need to be updated to add ourselves to the default applications
68 # we find the file and it does not seem to contain our patch already (the patch 68 # list. If we find the file and it does not seem to contain our patch already
69 # is safe to leave even after uninstall), update it. 69 # (the patch is safe to leave even after uninstall), update it.
70 GNOME_DFL_APPS=/usr/share/gnome-control-center/gnome-default-applications.xml 70 GNOME_DFL_APPS=/usr/share/gnome-control-center/default-apps/gnome-default-applic ations.xml
71 if [ -f "$GNOME_DFL_APPS" ]; then 71 if [ -f "$GNOME_DFL_APPS" ]; then
72 # Conditionally insert the contents of the file "default-app-block" after the 72 # Conditionally insert the contents of the file "default-app-block" after the
73 # first "<web-browsers>" line we find in gnome-default-applications.xml 73 # first "<web-browsers>" line we find in gnome-default-applications.xml
74 fgrep -q "@@MENUNAME@@" "$GNOME_DFL_APPS" || insert_after_first_match \ 74 fgrep -q "@@MENUNAME@@" "$GNOME_DFL_APPS" || insert_after_first_match \
75 "$GNOME_DFL_APPS" \ 75 "$GNOME_DFL_APPS" \
76 "^[ ]*<web-browsers>[ ]*$" \ 76 "^[ ]*<web-browsers>[ ]*$" \
77 "@@INSTALLDIR@@/default-app-block" 77 "@@INSTALLDIR@@/default-app-block"
78 fi 78 fi
OLDNEW
« no previous file with comments | « chrome/installer/linux/common/default-app.template ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698