summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@derf.homelinux.org>2008-11-03 15:14:12 +0100
committerDaniel Friesel <derf@derf.homelinux.org>2008-11-03 15:14:12 +0100
commit757a18e394063ada618df4714eb8fdd1f7131010 (patch)
treed769ff5380b0a2b708de1999be7b8710b10e6ecc
parent2295f52d4fa2882f4ad0ae724a3b1f3d7fa89f98 (diff)
bin/pkg: Fixed PKG_PATH
-rwxr-xr-xbin/pkg8
1 files changed, 2 insertions, 6 deletions
diff --git a/bin/pkg b/bin/pkg
index 613e843..946fd01 100755
--- a/bin/pkg
+++ b/bin/pkg
@@ -94,20 +94,16 @@ if [[ ${PKG_ROOT#ssh} != $PKG_ROOT ]] {
false
}
-# user@host
+# user, host, path
if [[ $PKG_PROTO = 'ssh' ]] {
PKG_HOST=${${PKG_ROOT#'ssh://'}%%/*}
+ PKG_PATH=${PKG_ROOT#"ssh://$PKG_HOST"}
if [[ $PKG_HOST == *@* ]] {
PKG_USER=${PKG_HOST%%@*}
PKG_HOST=${PKG_HOST#*@}
} else {
PKG_USER=$USERNAME
}
-}
-
-# Remote path
-if [[ $PKG_PROTO = 'ssh' ]] {
- PKG_PATH=${PKG_ROOT#"ssh://$PKG_HOST"}
} elif [[ $PKG_PROTO = 'file' ]] {
PKG_PATH=$PKG_ROOT
}