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

Side by Side Diff: scripts/xdg-icon-resource

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-email ('k') | scripts/xdg-mime » ('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-icon-resource 3 # xdg-icon-resource
4 # 4 #
5 # Utility script to install icons on a Linux desktop. 5 # Utility script to install icons 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 2009-2010, Fathi Boudra <fabo@freedesktop.org> 9 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org>
10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org> 10 # Copyright 2009-2010, Rex Dieter <rdieter@fedoraproject.org>
(...skipping 382 matching lines...) Expand 10 before | Expand all | Expand 10 after
393 #-------------------------------------- 393 #--------------------------------------
394 # Checks for known desktop environments 394 # Checks for known desktop environments
395 # set variable DE to the desktop environments name, lowercase 395 # set variable DE to the desktop environments name, lowercase
396 396
397 detectDE() 397 detectDE()
398 { 398 {
399 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde; 399 if [ x"$KDE_FULL_SESSION" = x"true" ]; then DE=kde;
400 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome; 400 elif [ x"$GNOME_DESKTOP_SESSION_ID" != x"" ]; then DE=gnome;
401 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul l 2>&1` ; then DE=gnome; 401 elif `dbus-send --print-reply --dest=org.freedesktop.DBus /org/freedesktop/D Bus org.freedesktop.DBus.GetNameOwner string:org.gnome.SessionManager > /dev/nul l 2>&1` ; then DE=gnome;
402 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce; 402 elif xprop -root _DT_SAVE_MODE 2> /dev/null | grep ' = \"xfce4\"$' >/dev/nul l 2>&1; then DE=xfce;
403 elif [ x"$DESKTOP_SESSION" == x"LXDE" ]; then DE=lxde; 403 fi
404 else DE="" 404
405 if [ x"$DE" = x"" ]; then
406 # fallback to checking $DESKTOP_SESSION
407 case "$DESKTOP_SESSION" in
408 LXDE)
409 DE=lxde;
410 ;;
411 xfce|xfce4)
412 DE=xfce;
413 ;;
414 esac
415 fi
416
417 if [ x"$DE" = x"" ]; then
418 # fallback to uname output for other platforms
419 case "$(uname 2>/dev/null)" in
420 Darwin)
421 DE=darwin;
422 ;;
423 esac
424 fi
425
426 if [ x"$DE" = x"gnome" ]; then
427 # gnome-default-applications-properties is only available in GNOME 2.x
428 # but not in GNOME 3.x
429 which gnome-default-applications-properties 2> /dev/null || DE="gnome3"
405 fi 430 fi
406 } 431 }
407 432
408 #---------------------------------------------------------------------------- 433 #----------------------------------------------------------------------------
409 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 434 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4
410 # It also always returns 1 in KDE 3.4 and earlier 435 # It also always returns 1 in KDE 3.4 and earlier
411 # Simply return 0 in such case 436 # Simply return 0 in such case
412 437
413 kfmclient_fix_exit_code() 438 kfmclient_fix_exit_code()
414 { 439 {
(...skipping 420 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 if [ x"$update" = x"yes" ] ; then 860 if [ x"$update" = x"yes" ] ; then
836 update_icon_database "$xdg_base_dir" 861 update_icon_database "$xdg_base_dir"
837 if [ -n "$dot_icon_dir" ] ; then 862 if [ -n "$dot_icon_dir" ] ; then
838 if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then 863 if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then
839 update_icon_database $dot_base_dir 864 update_icon_database $dot_base_dir
840 fi 865 fi
841 fi 866 fi
842 fi 867 fi
843 868
844 exit_success 869 exit_success
OLDNEW
« no previous file with comments | « scripts/xdg-email ('k') | scripts/xdg-mime » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698