#!/bin/sh #--------------------------------------------- # xdg-copy # # Utility script to copy files specified by URLs, including # downloading and uploading from/to remote sites. # # Refer to the usage() function below for usage. # # Copyright 2006, Kevin Krammer # Copyright 2006, Jeremy White # # LICENSE: # #--------------------------------------------- usage() { cat << _USAGE _USAGE exit 1 } copy_kde() { kfmclient copy "$1" "$2" exit $? } copy_gnome() { gnomevfs-copy "$1" "$2" exit $? } [ "$1" != "" ] || usage [ "$2" != "" ] || usage [ "$1" != "--help" ] || usage #@xdg-utils-common@ case "$DE" in kde) copy_kde "$1" "$2" ;; gnome) copy_gnome "$1" "$2" ;; *) echo Sorry, no method available for copying "$1" to "$2" exit 2 ;; esac