Skip to content
Snippets Groups Projects
Commit f4d3b78e authored by Stefano Di Frischia's avatar Stefano Di Frischia
Browse files

L2SS-409: fix shellcheck start-DS.sh

parent 5f766cfe
No related branches found
No related tags found
1 merge request!151Resolve L2SS-409 "Fix shellcheck ci"
#!/bin/bash
function help() function help()
{ {
why="${1}" why="${1}"
...@@ -29,14 +30,14 @@ esac ...@@ -29,14 +30,14 @@ esac
# ATTENTION # ATTENTION
# This is assuming that the device server's Python file exists # This is assuming that the device server's Python file exists
# on the Docker's host in the user's ${HOME} directory. # on the Docker's host in the user's ${HOME} directory.
runThis=$(basename ${deviceServer}) runThis=$(basename "${deviceServer}")
runThis=${runThis//.sh/.py} runThis=${runThis//.sh/.py}
if [ -f ${runThis} ]; then if [ -f "${runThis}" ]; then
myDir=${PWD} myDir=${PWD}
else else
myDir=${PWD}/$(dirname ${deviceServer}) myDir=${PWD}/$(dirname "${deviceServer}")
fi fi
deviceServerPath=${myDir/${HOME}/\/hosthome} deviceServerPath=${myDir/${HOME}/\/hosthome}
# Tango log lines start with a UNIX timestamp. Replace them with the UTC time. # Tango log lines start with a UNIX timestamp. Replace them with the UTC time.
docker exec -it itango python3 ${deviceServerPath}/${runThis} ${instance} ${@} | perl -ne 'use Time::Piece; s/^([0-9]+)/gmtime($1)->strftime("%F %T")/e; print;' docker exec -it itango python3 "${deviceServerPath}"/"${runThis}" "${instance}" "${@}" | perl -ne 'use Time::Piece; s/^([0-9]+)/gmtime($1)->strftime("%F %T")/e; print;'
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment