# HG changeset patch # User Jeff Hammel # Date 1374635307 25200 # Node ID 1919706e94f51f6e1fb12f8e84dc05bcf934ef96 # Parent 0f679925616ddeb607b1dbcde647486c3a03ace7 stub copy-remote diff -r 0f679925616d -r 1919706e94f5 bin/copy-remote.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bin/copy-remote.sh Tue Jul 23 20:08:27 2013 -0700 @@ -0,0 +1,32 @@ +#!/bin/bash + +# TODO -> silvermirror +# (STUB) + +REMOTE=k0s.org + +if ! echo $PWD | grep '^'$HOME +then + echo "should be in subtree of $HOME to use" + exit 1 +fi + +for i in "$@" +do + if [ ! -e $i ] + then + echo "Error: $i does not exist" + exit 1 + fi +done + +for i in "$@" +do + path=$(readlink -f $i) + if [ "${path:0:1}" != "/" ] + then + # relative path + #path=${PWD}/${path} + fi + scp ${REMOTE}:${path} ${path} +done \ No newline at end of file