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()
{
why="${1}"
......@@ -29,14 +30,14 @@ esac
# ATTENTION
# This is assuming that the device server's Python file exists
# on the Docker's host in the user's ${HOME} directory.
runThis=$(basename ${deviceServer})
runThis=$(basename "${deviceServer}")
runThis=${runThis//.sh/.py}
if [ -f ${runThis} ]; then
if [ -f "${runThis}" ]; then
myDir=${PWD}
else
myDir=${PWD}/$(dirname ${deviceServer})
myDir=${PWD}/$(dirname "${deviceServer}")
fi
deviceServerPath=${myDir/${HOME}/\/hosthome}
# 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.
Please register or to comment