From 4952157fc498c606e4e1dbbaa4e3a994970cf976 Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Sun, 19 Dec 2010 21:25:22 -0300 Subject: [PATCH] bin/qippl: log into www-data@downloads.qi-hardware.com or scp files --- bin/qippl | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 bin/qippl diff --git a/bin/qippl b/bin/qippl new file mode 100755 index 0000000..43e0cd1 --- /dev/null +++ b/bin/qippl @@ -0,0 +1,25 @@ +#!/bin/sh + +ACCT=www-data@downloads.qi-hardware.com +DIR=werner + +if [ -z "$1" ]; then + exec ssh $ACCT +fi + +if [ "${1#-}" != "$1" -o -z "$2" ]; then + echo "usage: $0" 2>&1 + echo " $0 file ... dir" 2>&1 + exit 1 +fi + +while [ "$2" ]; do + args="$args \"$1\"" + shift +done +if [ "${1#/}" = "$1" ]; then + dir=$DIR/$1 +else + dir=$1 +fi +eval scp $args $ACCT:$dir