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

Side by Side Diff: scripts/xdg-utils-common.in

Issue 7000007: Upstream adjusted my patch to xdg-utils a little before committing it. Merge. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/xdg-utils/
Patch Set: '' Created 9 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 | Annotate | Revision Log
« no previous file with comments | « scripts/xdg-settings ('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 1
2 #---------------------------------------------------------------------------- 2 #----------------------------------------------------------------------------
3 # Common utility functions included in all XDG wrapper scripts 3 # Common utility functions included in all XDG wrapper scripts
4 #---------------------------------------------------------------------------- 4 #----------------------------------------------------------------------------
5 5
6 DEBUG() 6 DEBUG()
7 { 7 {
8 [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0; 8 [ -z "${XDG_UTILS_DEBUG_LEVEL}" ] && return 0;
9 [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0; 9 [ ${XDG_UTILS_DEBUG_LEVEL} -lt $1 ] && return 0;
10 shift 10 shift
(...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 case "$(uname 2>/dev/null)" in 281 case "$(uname 2>/dev/null)" in
282 Darwin) 282 Darwin)
283 DE=darwin; 283 DE=darwin;
284 ;; 284 ;;
285 esac 285 esac
286 fi 286 fi
287 287
288 if [ x"$DE" = x"gnome" ]; then 288 if [ x"$DE" = x"gnome" ]; then
289 # gnome-default-applications-properties is only available in GNOME 2.x 289 # gnome-default-applications-properties is only available in GNOME 2.x
290 # but not in GNOME 3.x 290 # but not in GNOME 3.x
291 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE ="gnome3" 291 which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome 3"
292 fi 292 fi
293 } 293 }
294 294
295 #---------------------------------------------------------------------------- 295 #----------------------------------------------------------------------------
296 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 296 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
297 # It also always returns 1 in KDE 3.4 and earlier 297 # It also always returns 1 in KDE 3.4 and earlier
298 # Simply return 0 in such case 298 # Simply return 0 in such case
299 299
300 kfmclient_fix_exit_code() 300 kfmclient_fix_exit_code()
301 { 301 {
302 version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'` 302 version=`LC_ALL=C.UTF-8 kde-config --version 2>/dev/null | grep '^KDE'`
303 major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'` 303 major=`echo $version | sed 's/KDE.*: \([0-9]\).*/\1/'`
304 minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'` 304 minor=`echo $version | sed 's/KDE.*: [0-9]*\.\([0-9]\).*/\1/'`
305 release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'` 305 release=`echo $version | sed 's/KDE.*: [0-9]*\.[0-9]*\.\([0-9]\).*/\1/'`
306 test "$major" -gt 3 && return $1 306 test "$major" -gt 3 && return $1
307 test "$minor" -gt 5 && return $1 307 test "$minor" -gt 5 && return $1
308 test "$release" -gt 4 && return $1 308 test "$release" -gt 4 && return $1
309 return 0 309 return 0
310 } 310 }
OLDNEW
« no previous file with comments | « scripts/xdg-settings ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698