scripts

misc scripts and tools
git clone git://git.2f30.org/scripts
Log | Files | Refs

commit f2ff487b7778fc3c916618cf36be3e9e27673d8b
parent 8126c79b346ffcc739880358b2186c602d68a472
Author: Dimitris Papastamos <dp@opensource.wolfsonmicro.com>
Date:   Wed, 27 Nov 2013 11:09:59 +0000

Allow rdir/ldir to be overriden by the environment

Diffstat:
Mitor | 12++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/itor b/itor @@ -1,10 +1,14 @@ #!/bin/sh host=sin@amnezia.2f30.org -# remote directory -rdir=torrents -# local directory -ldir=~/torrents + +# remote directory - you can override it +# with the RDIR environment variable +rdir=$(test -n "$RDIR" && echo "$RDIR" || echo torrents) + +# local directory - you can override it +# with the LDIR environment variable +ldir=$(test -n "$LDIR" && echo "$LDIR" || echo $HOME/torrents) listing=$(mktemp) ssh $host "ls $rdir" > $listing