From 6ba30122e0b3b7a3f556e2cc2cac49d3ac8fa26f Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Wed, 31 Mar 2021 12:11:35 -0400 Subject: [PATCH] kiss-serv: updates, bugfixes --- kiss-serv/checksums | 4 ++-- kiss-serv/files/kiss-send-build | 17 +++++++++-------- kiss-serv/files/kiss-serv | 16 ++++++++++------ kiss-serv/version | 2 +- 4 files changed, 22 insertions(+), 17 deletions(-) diff --git a/kiss-serv/checksums b/kiss-serv/checksums index 22dd18b..db613db 100644 --- a/kiss-serv/checksums +++ b/kiss-serv/checksums @@ -1,2 +1,2 @@ -ab642b01282ce92aba462be2a579adb4691dc7c316ced87b7af55b928d6ea381 -0473fcb2d926b00521761ee2ead683c30778a44017ff0fb1895d31dd91ef51eb +fe87e9a3752c9c742eb1e0f5073e2be7861410d9dbec58d5601777d81047fc44 +ccfdf68a788c84430fab48e4e2f7a9a3dda96763ead54ce3d69e78e6e2698cad diff --git a/kiss-serv/files/kiss-send-build b/kiss-serv/files/kiss-send-build index f819dc0..4e650e7 100755 --- a/kiss-serv/files/kiss-send-build +++ b/kiss-serv/files/kiss-send-build @@ -5,22 +5,23 @@ usage() { build KISS packages on a remote server Options: - -h, --help show this help message + -h, --help show this help message Subcommands: build [package] initiate a remote build status get current remote status + status [package] get current remote status of a package get [package] receive a built package Configuration: Done via environment variables - $KISS_SERV_HOST remote host to connect to - (defaults to localhost) - $KISS_SERV_USER remote host to connect to - (defaults to $(whoami)) - $KISS_SERV_PORT remote port to connect to - (defaults to 22)' + $KISS_SERV_HOST remote host to connect to + (defaults to localhost) + $KISS_SERV_USER remote host to connect to + (defaults to $(whoami)) + $KISS_SERV_PORT remote port to connect to + (defaults to 22)' } parse_err() { @@ -57,7 +58,7 @@ while [ "$1" != "" ]; do sshexec "$@" ;; get) - get "$@" + "$1" "$@" ;; *) parse_err "ERROR: unknown option $1 \n" usage diff --git a/kiss-serv/files/kiss-serv b/kiss-serv/files/kiss-serv index e9f753f..f760a54 100755 --- a/kiss-serv/files/kiss-serv +++ b/kiss-serv/files/kiss-serv @@ -11,16 +11,20 @@ parse_err() { } build() { - nohup sh -c "yes | kiss build $2" & + nohup env KISS_PROMPT=0 kiss build "$2" 2>&1 > ~/.cache/kiss/logs/serv-"$2" & exit } status() { - echo "built packages:" - ls -1 ~/.cache/kiss/bin - echo "\nrunning kiss proceses:" - pgrep -fa kiss - exit + if [ -z "$2" ]; then + echo "built packages:" + ls -1 ~/.cache/kiss/bin + echo "\nrunning kiss proceses:" + pgrep -fa kiss + exit + else + tail -f "$HOME/.cache/kiss/logs/serv-$2" + fi } sshcmd="ssh -p ${KISS_SERV_PORT:-22} ${KISS_SERV_HOST:-localhost}" diff --git a/kiss-serv/version b/kiss-serv/version index 4d544ed..d758a95 100644 --- a/kiss-serv/version +++ b/kiss-serv/version @@ -1 +1 @@ -0.0.0 1 +0.0.1 1 -- 2.39.2