Skip to content

Commit

Permalink
Disable random quote with JBT_SHOW_QUOTE=false
Browse files Browse the repository at this point in the history
  • Loading branch information
muhme committed Nov 13, 2024
1 parent a54b270 commit 8b73d2e
Show file tree
Hide file tree
Showing 17 changed files with 25 additions and 49 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.0.30
2.0.31
4 changes: 1 addition & 3 deletions scripts/check
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ echo "
With the optional 'help' argument, displays this page. For full details, see https://bit.ly/JBT-README.
If no filename is specified, the latest log file is used.
$(random_quote)
"
$(random_quote)"
}

file=""
Expand Down
4 changes: 1 addition & 3 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ function help {
clean – Stops and removes all JBT Docker containers, associated Docker networks, and Docker volumes.
Also deletes JBT directories, such as 'run' and all 'joomla-*' directories.
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

while [ $# -ge 1 ]; do
Expand Down
4 changes: 1 addition & 3 deletions scripts/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ function help {
The optional 'repository:branch' argument (default repository is https://github.com/joomla/joomla-cms).
Optionally specify one or more patches (e.g., 'joomla-cypress-36'; default is unpatched).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in version numbers
Expand Down
4 changes: 1 addition & 3 deletions scripts/cypress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ function help {
The mandatory Joomla instance must be one of installed: ${allInstalledInstances[*]}.
The optional 'local' argument runs Cypress on the Docker host (default is the Docker container).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in instance numbers
Expand Down
4 changes: 1 addition & 3 deletions scripts/database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,7 @@ function help {
The optional 'socket' argument configures database access via Unix socket (default is TCP host).
Optional Joomla instances can include one or more of the installed: ${allInstalledInstances[*]} (default is all).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

socket=false
Expand Down
4 changes: 1 addition & 3 deletions scripts/graft.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@ function help {
The Joomla package file (e.g. 'Joomla_5.1.2-Stable-Full_Package.zip') is also mandatory.
Optional database variant can be one of: ${JBT_DB_VARIANTS[*]} (default is mariadbi).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in instance numbers
Expand Down
10 changes: 8 additions & 2 deletions scripts/helper.sh
Original file line number Diff line number Diff line change
Expand Up @@ -528,8 +528,14 @@ runningTime() {
# A day without a smile is a wasted day. Charlie Chaplin
# Shoot for the moon. Even if you miss, you'll land among the stars.
#
# Can be disable by env var JBT_SHOW_QUOTE=false
#
function random_quote() {

if [ "${JBT_SHOW_QUOTE}" = "false" ] || [ "${JBT_SHOW_QUOTE}" = "0" ]; then
return 0
fi

# Check the LANG environment variable
lang_code=$(echo "$LANG" | cut -c1-2 | tr '[:upper:]' '[:lower:]')

Expand Down Expand Up @@ -558,9 +564,9 @@ function random_quote() {
if [ "${quote}" != "" ]; then
# Print the author only if it's not "Unknown" with authorID 0
if [ "$authorID" != "0" ]; then
echo "\"${quote}\", ${author}"
printf "\\n \"${quote}\", ${author}\\n \\n"
else
echo "\"${quote}\""
printf "\\n \"${quote}\"\\n \\n"
fi
fi
}
Expand Down
4 changes: 1 addition & 3 deletions scripts/info
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ function help {
Optional Joomla instance arguments can be one or more of installed: ${allInstalledInstances[*]}.
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
If no argument is provided, all information is displayed.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in instance numbers
Expand Down
4 changes: 1 addition & 3 deletions scripts/patch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ function help {
The optional Joomla version can be one or more of: ${allInstalledInstances[*]} (default is all).
Specify one or more patches e.g. 'joomla-cms-43968', 'joomla-cypress-33' or 'database-310'.
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

patches=()
Expand Down
4 changes: 1 addition & 3 deletions scripts/patchtester.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ function help {
Requires a GitHub personal access token as an argument (starting with 'ghp_') if 'JBT_GITHUB_TOKEN' is not set.
The optional Joomla version can be one or more of: ${allInstalledInstances[*]} (default is all).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in version numbers
Expand Down
4 changes: 1 addition & 3 deletions scripts/php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ function help {
The mandatory PHP version must be one of: ${JBT_VALID_PHP_VERSIONS[*]}.
The optional Joomla version can include one or more of installed: ${allInstalledInstances[*]} (default is all).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in version numbers
Expand Down
4 changes: 1 addition & 3 deletions scripts/pull.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ function help {
Runs 'composer install' if changes are detected and 'npm clean install' if needed.
Optional Joomla instance can include one or more of installed: ${allInstalledInstances[*]} (default is all).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in instance numbers
Expand Down
4 changes: 1 addition & 3 deletions scripts/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,7 @@ function help {
Optional initial 'socket' enables database access via Unix socket (default is TCP host).
Optional 'unpatched' or one or multiple patches (default: ${JBT_DEFAULT_PATCHES[*]}).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# Defaults to use MariaDB with MySQLi database driver, to use cache and PHP 8.1.
Expand Down
4 changes: 1 addition & 3 deletions scripts/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ function help {
Specify an optional test name from: ${ALL_TESTS[*]} (default is all).
Optional Cypress spec file pattern for 'system' tests (default runs all without the installation step).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in version numbers
Expand Down
6 changes: 2 additions & 4 deletions scripts/versions
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ function help {
versions – Displays available Joomla versions from branches and tags,
or lists compatible PHP versions for the specified Joomla version.
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

while [ $# -ge 1 ]; do
Expand Down Expand Up @@ -88,4 +86,4 @@ else
fi
done

fi
fi
4 changes: 1 addition & 3 deletions scripts/xdebug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@ function help {
Mandatory argument must be 'on' or 'off'.
The optional Joomla instance can include one or more of installed: ${allInstalledInstances[*]} (default is all).
The optional argument 'help' displays this page. For full details see https://bit.ly/JBT-README.
$(random_quote)
"
$(random_quote)"
}

# shellcheck disable=SC2207 # There are no spaces in version numbers
Expand Down

0 comments on commit 8b73d2e

Please sign in to comment.