Merge pull request #2129 from alexbelgium/create-pull-request/patch-1759019547 nobuild

Github bot: fix linting issues nobuild
This commit is contained in:
Alexandre
2025-09-30 09:07:59 +02:00
committed by GitHub
7 changed files with 18 additions and 18 deletions

View File

@@ -6,7 +6,7 @@ fix_file="/etc/chromium.d/dev-shm"
if [ -f "${fix_file}" ]; then
bashio::log.info "Patching Chromium shared memory helper for reliable startup"
cat <<'PATCH' > "${fix_file}"
cat << 'PATCH' > "${fix_file}"
# shellcheck shell=sh
# Patched by alexbelgium/hassio-addons to avoid arithmetic errors with large values on some shells.
shm_avail=$(findmnt -bnr -o avail -T /dev/shm 2>/dev/null)

View File

@@ -7,16 +7,16 @@ echo "Warning - minimum configuration recommended: 2 CPU cores and 4 GB of memor
chromium_wrapper="/usr/bin/chromium"
if [[ -f "${chromium_wrapper}" ]]; then
if [[ ! -x /bin/bash ]]; then
bashio::log.warning "Chromium wrapper patch skipped: /bin/bash is not available."
else
if grep -q '^#!/bin/sh' "${chromium_wrapper}"; then
if grep -q '==' "${chromium_wrapper}"; then
bashio::log.info "Adjusting Chromium wrapper to use bash for compatibility with Chromium 140."
sed -i '1s|/bin/sh|/bin/bash|' "${chromium_wrapper}"
fi
if [[ ! -x /bin/bash ]]; then
bashio::log.warning "Chromium wrapper patch skipped: /bin/bash is not available."
else
if grep -q '^#!/bin/sh' "${chromium_wrapper}"; then
if grep -q '==' "${chromium_wrapper}"; then
bashio::log.info "Adjusting Chromium wrapper to use bash for compatibility with Chromium 140."
sed -i '1s|/bin/sh|/bin/bash|' "${chromium_wrapper}"
fi
fi
fi
fi
fi
##############