Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(307)

Side by Side Diff: third_party/xdg-utils/scripts/xdg-desktop-icon

Issue 159433: Bring xdg-utils up to date as of 2009-07-27. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/
Patch Set: Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « third_party/xdg-utils/README.google ('k') | third_party/xdg-utils/scripts/xdg-desktop-icon.in » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 # Is the KDE desktop dir != $HOME/Desktop ? 512 # Is the KDE desktop dir != $HOME/Desktop ?
513 if [ x`readlink -f "$desktop_dir"` != x`readlink -f "$desktop_dir_kde"` ]; t hen 513 if [ x`readlink -f "$desktop_dir"` != x`readlink -f "$desktop_dir_kde"` ]; t hen
514 # If so, don't create $HOME/Desktop if it doesn't exist 514 # If so, don't create $HOME/Desktop if it doesn't exist
515 [ -w $desktop_dir ] || desktop_dir= 515 [ -w $desktop_dir ] || desktop_dir=
516 else 516 else
517 desktop_dir_kde= 517 desktop_dir_kde=
518 fi 518 fi
519 fi 519 fi
520 desktop_dir="$desktop_dir $desktop_dir_kde $desktop_dir_gnome" 520 desktop_dir="$desktop_dir $desktop_dir_kde $desktop_dir_gnome"
521 521
522 basefile=`basename $desktop_file` 522 basefile=`basename "$desktop_file"`
523 523
524 DEBUG 1 "$action $desktop_file in $desktop_dir" 524 DEBUG 1 "$action $desktop_file in $desktop_dir"
525 525
526 case $action in 526 case $action in
527 install) 527 install)
528 save_umask=`umask` 528 save_umask=`umask`
529 umask $my_umask 529 umask $my_umask
530 530
531 for x in $desktop_dir ; do 531 for x in $desktop_dir ; do
532 mkdir -p $x 532 mkdir -p $x
533 eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output 533 eval 'cp $desktop_file $x/$basefile'$xdg_redirect_output
534 done 534 done
535 535
536 umask $save_umask 536 umask $save_umask
537 ;; 537 ;;
538 538
539 uninstall) 539 uninstall)
540 for x in $desktop_dir ; do 540 for x in $desktop_dir ; do
541 rm -f $x/$basefile 541 rm -f $x/$basefile
542 done 542 done
543 543
544 ;; 544 ;;
545 esac 545 esac
546 546
547 exit_success 547 exit_success
548 548
549 549
OLDNEW
« no previous file with comments | « third_party/xdg-utils/README.google ('k') | third_party/xdg-utils/scripts/xdg-desktop-icon.in » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698