#!/bin/sh # # ~/.config/rox.sourceforge.net/SendTo/Desktop # Desktop -- script for the ROX-Filer "Send To..." menu that # replicates the "Send to Desktop" function found in # Nautilus file manager, authored by George Notaras. # Copyright (C) 2009 anrxc # Licensed under the Apache License, Version 2.0 # http://www.apache.org/licenses/LICENSE-2.0 DESKTOP=~/Desktop if [ $# -lt 1 ]; then xmessage -center "At least one file or directory must be selected." elif [ $# -gt 1 ] ; then xmessage -center -buttons Okay:0,Cancel:1 "Multiple items selected. Proceed?" fi if [ "$?" = 1 ]; then exit 1 fi for item in "$@"; do ln -s "$item" "$DESKTOP/$(basename $item)" done exit 0