summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2007-10-19 09:59:23 (GMT)
committerColin Watson <cjwatson@debian.org>2007-10-19 09:59:23 (GMT)
commitfcf2d188965c3e27fd0b49f049711d2ff1d14d2d (patch)
treec61d2d9da599f5cde499490c1b10c07e0d53f97f /functions
parent50f4c4f5f10b5ccc0fe1b04e6184b8dad70ebbe1 (diff)
downloaddebootstrap-fcf2d188965c3e27fd0b49f049711d2ff1d14d2d.zip
debootstrap-fcf2d188965c3e27fd0b49f049711d2ff1d14d2d.tar.gz
debootstrap-fcf2d188965c3e27fd0b49f049711d2ff1d14d2d.tar.bz2
* Add support for ssh:/// URLs (thanks, Steffen Joeris; closes: #434893).
r49820
Diffstat (limited to 'functions')
-rw-r--r--functions8
1 files changed, 8 insertions, 0 deletions
diff --git a/functions b/functions
index 5175cfd..980e0d5 100644
--- a/functions
+++ b/functions
@@ -351,6 +351,14 @@ just_get () {
else
return 1
fi
+ elif [ "${from#ssh:}" != "$from" ]; then
+ local ssh_dest="$(echo $from | sed -e 's#ssh://##' -e 's#/#:/#')"
+ if [ -n "$ssh_dest" ]; then
+ scp "$ssh_dest" "$dest"
+ return 0
+ else
+ return 1
+ fi
else
error 1 UNKNOWNLOC "unknown location %s" "$from"
fi