| OLD | NEW |
| 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 2006, Kevin Krammer <kevin.krammer@gmx.at> | 9 # Copyright 2006, Kevin Krammer <kevin.krammer@gmx.at> |
| 10 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> | 10 # Copyright 2006, Jeremy White <jwhite@codeweavers.com> |
| (...skipping 753 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 764 fi | 764 fi |
| 765 my_umask=022 | 765 my_umask=022 |
| 766 fi | 766 fi |
| 767 # End KDE legacy workaround section | 767 # End KDE legacy workaround section |
| 768 | 768 |
| 769 # Start GNOME legacy workaround section | 769 # Start GNOME legacy workaround section |
| 770 need_gnome_mime= | 770 need_gnome_mime= |
| 771 [ $context = "mimetypes" ] && need_gnome_mime=true | 771 [ $context = "mimetypes" ] && need_gnome_mime=true |
| 772 # End GNOME legacy workaround section | 772 # End GNOME legacy workaround section |
| 773 | 773 |
| 774 [ -n "$icon_name" ] || icon_name=`basename $icon_file | sed 's/\.[a-z][a-z][a-z]
$//'` | 774 [ -n "$icon_name" ] || icon_name=`basename "$icon_file" | sed 's/\.[a-z][a-z][a-
z]$//'` |
| 775 | 775 |
| 776 if [ "$vendor" = "true" -a "$action" = "install" -a "$context" = "apps" ] ; then | 776 if [ "$vendor" = "true" -a "$action" = "install" -a "$context" = "apps" ] ; then |
| 777 check_vendor_prefix "$icon_name" "icon name" | 777 check_vendor_prefix "$icon_name" "icon name" |
| 778 fi | 778 fi |
| 779 | 779 |
| 780 icon_icon_file=`echo "$icon_file" | sed 's/\.[a-z][a-z][a-z]$/.icon/'` | 780 icon_icon_file=`echo "$icon_file" | sed 's/\.[a-z][a-z][a-z]$/.icon/'` |
| 781 icon_icon_name="$icon_name.icon" | 781 icon_icon_name="$icon_name.icon" |
| 782 | 782 |
| 783 DEBUG 1 "$action icon in $xdg_dir" | 783 DEBUG 1 "$action icon in $xdg_dir" |
| 784 [ $action = "install" -a -f $icon_icon_file ] && DEBUG 1 "install $icon_icon_nam
e meta file in $xdg_dir" | 784 [ $action = "install" -a -f $icon_icon_file ] && DEBUG 1 "install $icon_icon_nam
e meta file in $xdg_dir" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 828 if [ x"$update" = x"yes" ] ; then | 828 if [ x"$update" = x"yes" ] ; then |
| 829 update_icon_database "$xdg_base_dir" | 829 update_icon_database "$xdg_base_dir" |
| 830 if [ -n "$dot_icon_dir" ] ; then | 830 if [ -n "$dot_icon_dir" ] ; then |
| 831 if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then | 831 if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then |
| 832 update_icon_database $dot_base_dir | 832 update_icon_database $dot_base_dir |
| 833 fi | 833 fi |
| 834 fi | 834 fi |
| 835 fi | 835 fi |
| 836 | 836 |
| 837 exit_success | 837 exit_success |
| OLD | NEW |