| OLD | NEW |
| 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 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 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 case "$(uname 2>/dev/null)" in | 492 case "$(uname 2>/dev/null)" in |
| 493 Darwin) | 493 Darwin) |
| 494 DE=darwin; | 494 DE=darwin; |
| 495 ;; | 495 ;; |
| 496 esac | 496 esac |
| 497 fi | 497 fi |
| 498 | 498 |
| 499 if [ x"$DE" = x"gnome" ]; then | 499 if [ x"$DE" = x"gnome" ]; then |
| 500 # gnome-default-applications-properties is only available in GNOME 2.x | 500 # gnome-default-applications-properties is only available in GNOME 2.x |
| 501 # but not in GNOME 3.x | 501 # but not in GNOME 3.x |
| 502 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" | 502 which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome
3" |
| 503 fi | 503 fi |
| 504 } | 504 } |
| 505 | 505 |
| 506 #---------------------------------------------------------------------------- | 506 #---------------------------------------------------------------------------- |
| 507 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 507 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
| 508 # It also always returns 1 in KDE 3.4 and earlier | 508 # It also always returns 1 in KDE 3.4 and earlier |
| 509 # Simply return 0 in such case | 509 # Simply return 0 in such case |
| 510 | 510 |
| 511 kfmclient_fix_exit_code() | 511 kfmclient_fix_exit_code() |
| 512 { | 512 { |
| (...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 642 rm -f "$x/$basefile" | 642 rm -f "$x/$basefile" |
| 643 fi | 643 fi |
| 644 done | 644 done |
| 645 | 645 |
| 646 ;; | 646 ;; |
| 647 esac | 647 esac |
| 648 | 648 |
| 649 exit_success | 649 exit_success |
| 650 | 650 |
| 651 | 651 |
| OLD | NEW |