diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-08 19:54:42 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2009-07-08 19:54:42 +0200 |
commit | be02e06b00e95060d8707713e8d2140c2f5da70f (patch) | |
tree | 209123cd0277753b47be24874cd6c9ee78baf2ca /bin/pkg | |
parent | 8421fbd6f4a90749d91ef321434e12050537617d (diff) |
pkg: Added experimental support for git:// roots
Diffstat (limited to 'bin/pkg')
-rwxr-xr-x | bin/pkg | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -136,6 +136,8 @@ if [[ ! -d $PKG_DIR ]] { # Protocol if [[ $PKG_ROOT == ssh://* ]] { PKG_PROTO='ssh' +} elif [[ $PKG_ROOT == git://* ]] { + PKG_PROTO='git' } elif [[ $PKG_ROOT == /* ]] { PKG_PROTO='file' } else { @@ -143,9 +145,9 @@ if [[ $PKG_ROOT == ssh://* ]] { } # user, host, path -if [[ $PKG_PROTO == 'ssh' ]] { - PKG_HOST=${${PKG_ROOT#'ssh://'}%%/*} - PKG_PATH=${PKG_ROOT#"ssh://$PKG_HOST"} +if [[ $PKG_PROTO == (git|ssh) ]] { + PKG_HOST=${${PKG_ROOT#"${PKG_PROTO}://"}%%/*} + PKG_PATH=${PKG_ROOT#"${PKG_PROTO}://$PKG_HOST"} if [[ $PKG_HOST == *@* ]] { PKG_USER=${PKG_HOST%%@*} PKG_HOST=${PKG_HOST#*@} |