From 50bb0a9670a57eb479d829455894552342b90ddb Mon Sep 17 00:00:00 2001 From: Ivan Johnson Date: Tue, 13 Feb 2024 22:14:41 -0600 Subject: [PATCH] BUG: Shellcheck fixes --- example_tool/Orthanc/tmux_startup.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/example_tool/Orthanc/tmux_startup.sh b/example_tool/Orthanc/tmux_startup.sh index a6d98acbb..14e4eab39 100755 --- a/example_tool/Orthanc/tmux_startup.sh +++ b/example_tool/Orthanc/tmux_startup.sh @@ -5,8 +5,8 @@ orthanc_dir=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) # Prompt the user if they want to kill all Orthanc processes echo "Do you want to kill all Orthanc processes before starting? (y/n)" -read kill_answer -if [ "$kill_answer" = "y" ]; then +read -r kill_answer +if [ "${kill_answer}" = "y" ]; then echo "Killing all Orthanc processes..." killall Orthanc || echo "No Orthanc processes were found running." fi @@ -16,15 +16,15 @@ tmux new-session -d -s example_tool_testing # Create windows for running hospital and internal PACS tmux new-window -d -t example_tool_testing -n run_hospital -tmux send-keys -t example_tool_testing:run_hospital.0 '/bin/bash $(pwd)/run_hospital.sh' C-m +tmux send-keys -t example_tool_testing:run_hospital.0 "/bin/bash $(pwd)/run_hospital.sh" C-m tmux new-window -d -t example_tool_testing -n run_internal_pacs -tmux send-keys -t example_tool_testing:run_internal_pacs.0 '/bin/bash $(pwd)/run_internal_pacs.sh' C-m +tmux send-keys -t example_tool_testing:run_internal_pacs.0 "/bin/bash $(pwd)/run_internal_pacs.sh" C-m # Prompt for uploading example data echo "Do you want to upload example data? (y/n)" -read upload_answer -if [ "$upload_answer" = "y" ]; then +read -r upload_answer +if [ "${upload_answer}" = "y" ]; then # Create a new window for uploading data tmux new-window -d -t example_tool_testing -n upload_data tmux send-keys -t example_tool_testing:upload_data.0 "python3 '${orthanc_dir}/upload_example_data_to_hospital.py'" C-m