Simplify if logic

This commit is contained in:
TheSpad 2022-08-28 18:37:38 +01:00
parent ea7f9dddff
commit 10d77113b5
No known key found for this signature in database
GPG key ID: 08F06191F4587860

View file

@ -1,7 +1,7 @@
#!/usr/bin/with-contenv bash #!/usr/bin/with-contenv bash
# shellcheck shell=bash # shellcheck shell=bash
if [[ "$(find /var/run/s6/container_environment/*"FILE__"* -maxdepth 1 2>/dev/null)" ]]; then if find /var/run/s6/container_environment/*"FILE__"* -maxdepth 1 > /dev/null 2>&1; then
for FILENAME in /var/run/s6/container_environment/*; do for FILENAME in /var/run/s6/container_environment/*; do
if [[ "${FILENAME##*/}" == "FILE__"* ]]; then if [[ "${FILENAME##*/}" == "FILE__"* ]]; then
SECRETFILE=$(cat "${FILENAME}") SECRETFILE=$(cat "${FILENAME}")