OLD | NEW |
1 #!/bin/sh | 1 #!/bin/sh |
2 #--------------------------------------------- | 2 #--------------------------------------------- |
3 # xdg-mime | 3 # xdg-mime |
4 # | 4 # |
5 # Utility script to manipulate MIME related information | 5 # Utility script to manipulate MIME related information |
6 # on XDG compliant systems. | 6 # on XDG compliant systems. |
7 # | 7 # |
8 # Refer to the usage() function below for usage. | 8 # Refer to the usage() function below for usage. |
9 # | 9 # |
10 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> | 10 # Copyright 2009-2010, Fathi Boudra <fabo@freedesktop.org> |
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
449 case "$(uname 2>/dev/null)" in | 449 case "$(uname 2>/dev/null)" in |
450 Darwin) | 450 Darwin) |
451 DE=darwin; | 451 DE=darwin; |
452 ;; | 452 ;; |
453 esac | 453 esac |
454 fi | 454 fi |
455 | 455 |
456 if [ x"$DE" = x"gnome" ]; then | 456 if [ x"$DE" = x"gnome" ]; then |
457 # gnome-default-applications-properties is only available in GNOME 2.x | 457 # gnome-default-applications-properties is only available in GNOME 2.x |
458 # but not in GNOME 3.x | 458 # but not in GNOME 3.x |
459 which gnome-default-applications-properties 2> /dev/null || DE="gnome3" | 459 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" |
460 fi | 460 fi |
461 } | 461 } |
462 | 462 |
463 #---------------------------------------------------------------------------- | 463 #---------------------------------------------------------------------------- |
464 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 464 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
465 # It also always returns 1 in KDE 3.4 and earlier | 465 # It also always returns 1 in KDE 3.4 and earlier |
466 # Simply return 0 in such case | 466 # Simply return 0 in such case |
467 | 467 |
468 kfmclient_fix_exit_code() | 468 kfmclient_fix_exit_code() |
469 { | 469 { |
(...skipping 771 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1241 rm -f $kde_dir/$x.desktop | 1241 rm -f $kde_dir/$x.desktop |
1242 fi | 1242 fi |
1243 done | 1243 done |
1244 ;; | 1244 ;; |
1245 esac | 1245 esac |
1246 | 1246 |
1247 update_mime_database $xdg_base_dir | 1247 update_mime_database $xdg_base_dir |
1248 | 1248 |
1249 exit_success | 1249 exit_success |
1250 | 1250 |
OLD | NEW |