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: third_party/xdg-utils/scripts/xdg-desktop-icon.in

Issue 159433: Bring xdg-utils up to date as of 2009-07-27. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 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
OLDNEW
1 #!/bin/sh 1 #!/bin/sh
2 #--------------------------------------------- 2 #---------------------------------------------
3 # xdg-desktop-icon 3 # xdg-desktop-icon
4 # 4 #
5 # Utility script to install desktop items on a Linux desktop. 5 # Utility script to install desktop items on a Linux desktop.
6 # 6 #
7 # Refer to the usage() function below for usage. 7 # Refer to the usage() function below for usage.
8 # 8 #
9 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> 9 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at>
10 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> 10 # Copyright 2006, Jeremy White <jwhite@codeweavers.com>
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 # Is the KDE desktop dir != $HOME/Desktop ? 114 # Is the KDE desktop dir != $HOME/Desktop ?
115 if [ x`readlink -f "$desktop_dir"` != x`readlink -f "$desktop_dir_kde"` ]; t hen 115 if [ x`readlink -f "$desktop_dir"` != x`readlink -f "$desktop_dir_kde"` ]; t hen
116 # If so, don't create $HOME/Desktop if it doesn't exist 116 # If so, don't create $HOME/Desktop if it doesn't exist
117 [ -w $desktop_dir ] || desktop_dir= 117 [ -w $desktop_dir ] || desktop_dir=
118 else 118 else
119 desktop_dir_kde= 119 desktop_dir_kde=
120 fi 120 fi
121 fi 121 fi
122 desktop_dir="$desktop_dir $desktop_dir_kde $desktop_dir_gnome" 122 desktop_dir="$desktop_dir $desktop_dir_kde $desktop_dir_gnome"
123 123
124 basefile=`basename $desktop_file` 124 basefile=`basename "$desktop_file"`
125 125
126 DEBUG 1 "$action $desktop_file in $desktop_dir" 126 DEBUG 1 "$action $desktop_file in $desktop_dir"
127 127
128 case $action in 128 case $action in
129 install) 129 install)
130 save_umask=`umask` 130 save_umask=`umask`
131 umask $my_umask 131 umask $my_umask
132 132
133 for x in $desktop_dir ; do 133 for x in $desktop_dir ; do
134 mkdir -p $x 134 mkdir -p $x
135 eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output 135 eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output
136 done 136 done
137 137
138 umask $save_umask 138 umask $save_umask
139 ;; 139 ;;
140 140
141 uninstall) 141 uninstall)
142 for x in $desktop_dir ; do 142 for x in $desktop_dir ; do
143 rm -f $x/$basefile 143 rm -f $x/$basefile
144 done 144 done
145 145
146 ;; 146 ;;
147 esac 147 esac
148 148
149 exit_success 149 exit_success
150 150
151 151
OLDNEW
« no previous file with comments | « third_party/xdg-utils/scripts/xdg-desktop-icon ('k') | third_party/xdg-utils/scripts/xdg-desktop-menu » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698