#!/bin/bash # Create symbolic link(s) on the desktop to the object(s) selected, or to the # enclosing directory if not. # A script for use (only) with Nautilus. Requires either 'zenity', or # slight hacking to use something else. # # To use, copy to your ${HOME}/.gnome2/nautilus-scripts directory # # Please report any bugs! # # Author: Jon Green < g-scripts [at] green-lines [dot] com > # Version: 1.0 LINKS="${HOME}/Desktop" ZENITY=zenity warning() { ${ZENITY} --warning --warning-text "$*" } if [ ! -d "${LINKS}" ]; then warning "No desktop directory '${LINKS}' found - sorry." exit 1 fi declare -a NAUTFILES export IX=0 while read FILE; do if [ "x${FILE}" != "x" -a "x${FILE}" != 'x"' ]; then NAUTFILES[${IX}]="${FILE}" IX=$[ ${IX} + 1 ] fi done <