| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 fi | 374 fi |
| 375 my_umask=022 | 375 my_umask=022 |
| 376 fi | 376 fi |
| 377 # End KDE legacy workaround section | 377 # End KDE legacy workaround section |
| 378 | 378 |
| 379 # Start GNOME legacy workaround section | 379 # Start GNOME legacy workaround section |
| 380 need_gnome_mime= | 380 need_gnome_mime= |
| 381 [ $context = "mimetypes" ] && need_gnome_mime=true | 381 [ $context = "mimetypes" ] && need_gnome_mime=true |
| 382 # End GNOME legacy workaround section | 382 # End GNOME legacy workaround section |
| 383 | 383 |
| 384 [ -n "$icon_name" ] || icon_name=`basename $icon_file | sed 's/\.[a-z][a-z][a-z]
$//'` | 384 [ -n "$icon_name" ] || icon_name=`basename "$icon_file" | sed 's/\.[a-z][a-z][a-
z]$//'` |
| 385 | 385 |
| 386 if [ "$vendor" = "true" -a "$action" = "install" -a "$context" = "apps" ] ; then | 386 if [ "$vendor" = "true" -a "$action" = "install" -a "$context" = "apps" ] ; then |
| 387 check_vendor_prefix "$icon_name" "icon name" | 387 check_vendor_prefix "$icon_name" "icon name" |
| 388 fi | 388 fi |
| 389 | 389 |
| 390 icon_icon_file=`echo "$icon_file" | sed 's/\.[a-z][a-z][a-z]$/.icon/'` | 390 icon_icon_file=`echo "$icon_file" | sed 's/\.[a-z][a-z][a-z]$/.icon/'` |
| 391 icon_icon_name="$icon_name.icon" | 391 icon_icon_name="$icon_name.icon" |
| 392 | 392 |
| 393 DEBUG 1 "$action icon in $xdg_dir" | 393 DEBUG 1 "$action icon in $xdg_dir" |
| 394 [ $action = "install" -a -f $icon_icon_file ] && DEBUG 1 "install $icon_icon_nam
e meta file in $xdg_dir" | 394 [ $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... |
| 438 if [ x"$update" = x"yes" ] ; then | 438 if [ x"$update" = x"yes" ] ; then |
| 439 update_icon_database "$xdg_base_dir" | 439 update_icon_database "$xdg_base_dir" |
| 440 if [ -n "$dot_icon_dir" ] ; then | 440 if [ -n "$dot_icon_dir" ] ; then |
| 441 if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then | 441 if [ -d "$dot_icon_dir/" -a ! -L "$dot_icon_dir" ] ; then |
| 442 update_icon_database $dot_base_dir | 442 update_icon_database $dot_base_dir |
| 443 fi | 443 fi |
| 444 fi | 444 fi |
| 445 fi | 445 fi |
| 446 | 446 |
| 447 exit_success | 447 exit_success |
| OLD | NEW |