]> git.armaanb.net Git - asd-repo.git/blobdiff - kiss-serv/files/kiss-send-build
kiss-serv: updates, bugfixes
[asd-repo.git] / kiss-serv / files / kiss-send-build
index 72c3d84a1ae3f83b95a28e410b0628bd9be93b0b..f819dc01459c07ffab7c7bc5f92c62a5d4161e01 100755 (executable)
@@ -35,16 +35,17 @@ sshexec() {
 }
 
 get() {
-  contents=$sshcmd 'ls -1 ~/.cache/kiss/bin/'
-  pkg=$(echo $contents | sort | grep -m 1 "$2")
-  rsync -azre "ssh -p $sshcmd" "$user"@"$host":/home/"$user"/.cache/kiss/bin/"$pkg" \
+  pkg=$($sshcmd 'ls -1 ~/.cache/kiss/bin/' | sort | grep -m 1 "$2")
+  rsync -azre "ssh -p $port" "$user@$host":/home/"$user"/.cache/kiss/bin/"$pkg" \
     ~/.cache/kiss/bin
+  echo "fetched $pkg from $host"
+  exit
 }
 
 port=${KISS_SERV_PORT:-22}
 host=${KISS_SERV_HOST:-localhost}
 user=${KISS_SERV_USER:-$(whoami)}
-sshcmd="ssh -p $port $user@$host"
+sshcmd="ssh -p $port $user@$host env KISS_PATH=$KISS_PATH"
 
 while [ "$1" != "" ]; do
   case $1 in
@@ -52,10 +53,7 @@ while [ "$1" != "" ]; do
       usage
       exit
       ;;
-    build)
-      build "$@"
-      ;;
-    status | get)
+    status | build)
       sshexec "$@"
       ;;
     get)