shellcheck improvements
This commit is contained in:
parent
677fdca805
commit
f5f02cb1e9
@ -32,10 +32,10 @@ function checkDockerInstalled () {
|
||||
if
|
||||
[ ! -f /usr/local/bin/triton-docker-helper ] ||
|
||||
[ ! -x /usr/local/bin/triton-docker-helper ] ||
|
||||
[ "${triton_docker_version}," != $(/usr/local/bin/triton-docker-helper -v | awk '{print $3}') ] ||
|
||||
[ "${triton_docker_version}," != "$(/usr/local/bin/triton-docker-helper -v | awk '{print $3}')" ] ||
|
||||
[ ! -f /usr/local/bin/triton-compose-helper ] ||
|
||||
[ ! -x /usr/local/bin/triton-compose-helper ] ||
|
||||
[ "${triton_compose_version}," != $(/usr/local/bin/triton-compose-helper -v | awk '{print $3}') ]
|
||||
[ "${triton_compose_version}," != "$(/usr/local/bin/triton-compose-helper -v | awk '{print $3}')" ]
|
||||
then
|
||||
echo 'Additional or updated components are required.'
|
||||
echo 'Please run `sudo triton-docker-install` to continue.'
|
||||
@ -55,7 +55,7 @@ function install () {
|
||||
# Install the specific version of Docker for Triton
|
||||
rm -Rf /tmp/triton-docker /usr/local/bin/triton-docker-helper
|
||||
mkdir -p /tmp/triton-docker
|
||||
curl https://get.docker.com/builds/$(uname -a | awk '{ print $1 }')/x86_64/docker-${triton_docker_version}.tgz | tar zxvf - -C /tmp/triton-docker
|
||||
curl https://get.docker.com/builds/"$(uname -a | awk '{ print $1 }')"/x86_64/docker-${triton_docker_version}.tgz | tar zxvf - -C /tmp/triton-docker
|
||||
mv /tmp/triton-docker/docker/docker /usr/local/bin/triton-docker-helper
|
||||
rm -Rf /tmp/triton-docker
|
||||
chmod +x /usr/local/bin/triton-docker-helper
|
||||
@ -64,7 +64,7 @@ function install () {
|
||||
echo
|
||||
|
||||
# Install the specific version of Docker Compose for Triton
|
||||
curl -Lo /usr/local/bin/triton-compose-helper https://github.com/docker/compose/releases/download/${triton_compose_version}/docker-compose-$(uname -a | awk '{ print $1 }')-x86_64
|
||||
curl -Lo /usr/local/bin/triton-compose-helper https://github.com/docker/compose/releases/download/${triton_compose_version}/docker-compose-"$(uname -a | awk '{ print $1 }')"-x86_64
|
||||
chmod +x /usr/local/bin/triton-compose-helper
|
||||
|
||||
echo "The triton-compose-helper is now installed."
|
||||
@ -85,7 +85,7 @@ then
|
||||
fi
|
||||
|
||||
# Change behavior based on the calling name of this executable
|
||||
case "`basename $0`" in
|
||||
case "$(basename $0)" in
|
||||
triton-docker)
|
||||
checkAll &&
|
||||
eval "$(triton env)" &&
|
||||
|
Loading…
Reference in New Issue
Block a user