Re: nautilus-actions that need parameters?



On Sun, Apr 15, 2007 at 11:16:43AM -0700, Steven Brown wrote:
> Hi Ross,
> 
> You could try using zenity to prompt the user for the directory, and 
> then call rsync.
> 
> DIR=`zenity --file-selection --directory --filename="$DEFAULT_DIR" 
> --title="Please choose a directory..."`;

Perfect, super-simple:

#!/bin/bash

TARGET=`zenity --file-selection --directory --title="Please choose a directory..."`

/usr/bin/rsync $* $TARGET | zenity --progress --pulsate --text="Running rsync..."


Even gives is a progress bar.  Thanks for the tip!


-- 
Ross Vandegrift
ross kallisti us

"The good Christian should beware of mathematicians, and all those who
make empty prophecies. The danger already exists that the mathematicians
have made a covenant with the devil to darken the spirit and to confine
man in the bonds of Hell."
	--St. Augustine, De Genesi ad Litteram, Book II, xviii, 37



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]