DOMAIN env var functionality improvements

This commit is contained in:
mrfry 2023-04-11 11:18:13 +02:00
parent d9e5c8bdb0
commit 8e91b93d29
3 changed files with 2 additions and 94 deletions

View file

@ -6,12 +6,12 @@ resultUserscriptPath="./stable.user.js"
domain="${DOMAIN}"
if [ -f "${domainPath}" ]; then
if [ -z "${domain}" ] && [ -f "${domainPath}" ]; then
domain=$(cat "${domainPath}")
fi
if [ -z "${domain}" ]; then
echo -e "\033[0;41m${domainPath} does not exist, and DOMAIN is not set!\033[0m"
echo -e "\033[0;41mDOMAIN is not set, and ${domainPath} does not exist!\033[0m"
exit 1
fi