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 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
514 case "$(uname 2>/dev/null)" in | 514 case "$(uname 2>/dev/null)" in |
515 Darwin) | 515 Darwin) |
516 DE=darwin; | 516 DE=darwin; |
517 ;; | 517 ;; |
518 esac | 518 esac |
519 fi | 519 fi |
520 | 520 |
521 if [ x"$DE" = x"gnome" ]; then | 521 if [ x"$DE" = x"gnome" ]; then |
522 # gnome-default-applications-properties is only available in GNOME 2.x | 522 # gnome-default-applications-properties is only available in GNOME 2.x |
523 # but not in GNOME 3.x | 523 # but not in GNOME 3.x |
524 which gnome-default-applications-properties > /dev/null 2> /dev/null || DE
="gnome3" | 524 which gnome-default-applications-properties > /dev/null 2>&1 || DE="gnome
3" |
525 fi | 525 fi |
526 } | 526 } |
527 | 527 |
528 #---------------------------------------------------------------------------- | 528 #---------------------------------------------------------------------------- |
529 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 | 529 # kfmclient exec/openURL can give bogus exit value in KDE <= 3.5.4 |
530 # It also always returns 1 in KDE 3.4 and earlier | 530 # It also always returns 1 in KDE 3.4 and earlier |
531 # Simply return 0 in such case | 531 # Simply return 0 in such case |
532 | 532 |
533 kfmclient_fix_exit_code() | 533 kfmclient_fix_exit_code() |
534 { | 534 { |
(...skipping 839 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1374 rm -f $kde_dir/$x.desktop | 1374 rm -f $kde_dir/$x.desktop |
1375 fi | 1375 fi |
1376 done | 1376 done |
1377 ;; | 1377 ;; |
1378 esac | 1378 esac |
1379 | 1379 |
1380 update_mime_database $xdg_base_dir | 1380 update_mime_database $xdg_base_dir |
1381 | 1381 |
1382 exit_success | 1382 exit_success |
1383 | 1383 |
OLD | NEW |