From 3f20c23ea17bef37bc5005e6833d5db982527a50 Mon Sep 17 00:00:00 2001 From: Ben Kochie Date: Wed, 9 Apr 2025 23:30:33 +0100 Subject: [PATCH] fix: Shell linting (#328) Cleanup various shell linting issues * Use `/usr/bin/env` consistently for better platform compatibility. * SC2317 (info): Command appears to be unreachable. * SC2002 (style): Useless cat. Signed-off-by: SuperQ --- dev_deploy.sh | 9 +++++---- publish_source.sh | 4 ++-- ui/dev_device.sh | 2 +- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/dev_deploy.sh b/dev_deploy.sh index 7fbf29e..3f2ebb6 100755 --- a/dev_deploy.sh +++ b/dev_deploy.sh @@ -1,3 +1,5 @@ +#!/usr/bin/env bash +# # Exit immediately if a command exits with a non-zero status set -e @@ -16,7 +18,6 @@ show_help() { echo "Example:" echo " $0 -r 192.168.0.17" echo " $0 -r 192.168.0.17 -u admin" - exit 0 } # Default values @@ -70,10 +71,10 @@ cd bin ssh "${REMOTE_USER}@${REMOTE_HOST}" "killall jetkvm_app_debug || true" # Copy the binary to the remote host -cat jetkvm_app | ssh "${REMOTE_USER}@${REMOTE_HOST}" "cat > $REMOTE_PATH/jetkvm_app_debug" +ssh "${REMOTE_USER}@${REMOTE_HOST}" "cat > ${REMOTE_PATH}/jetkvm_app_debug" < jetkvm_app # Deploy and run the application on the remote host -ssh "${REMOTE_USER}@${REMOTE_HOST}" ash <