Revision ade6513a src/datastore_mad/remotes/downloader.sh
src/datastore_mad/remotes/downloader.sh | ||
---|---|---|
176 | 176 |
|
177 | 177 |
command="curl $curl_args" |
178 | 178 |
;; |
179 |
ssh://*) |
|
180 |
# pseudo-url for ssh transfers ssh://user@host:path |
|
181 |
# -l to limit the bw |
|
182 |
ssh_src=$(echo $FROM | grep -Po '(?<=ssh://).+') |
|
183 |
ssh_arg=(${ssh_src//:/ }) |
|
184 |
|
|
185 |
rmt_cmd="'cat ${ssh_arg[1]}'" |
|
186 |
|
|
187 |
command="ssh ${ssh_arg[0]} $rmt_cmd" |
|
188 |
;; |
|
179 | 189 |
*) |
180 | 190 |
if [ ! -r $FROM ]; then |
181 | 191 |
echo "Cannot read from $FROM" >&2 |
Also available in: Unified diff