From 3eab1e668fb7f712bb7437446b6a07ee46ff69bd Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Thu, 9 Nov 2023 09:03:35 +0100 Subject: [PATCH] ci: fix linter errors: find-container.sh --- scripts/find-container.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/find-container.sh b/scripts/find-container.sh index e2e6c99..50f2248 100755 --- a/scripts/find-container.sh +++ b/scripts/find-container.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash set -e -if [[ ! -z "$NEXTCLOUD_PROJECT_NAME" ]]; then +if [[ -n "$NEXTCLOUD_PROJECT_NAME" ]]; then containerName="${NEXTCLOUD_PROJECT_NAME}[_-]" matchEnd="[\._-]\d+" else @@ -12,6 +12,6 @@ containerName="${containerName}${NEXTCLOUD_CONTAINER_NAME}" # Get the ID of the first matching container so we can exec something in it later docker ps --format '{{.Names}},{{.ID}}' | \ - egrep "^${containerName}${matchEnd}" | \ + grep -E "^${containerName}${matchEnd}" | \ awk '{split($0,a,","); print a[2]}' | \ head -n 1