mirror of
https://github.com/pi-hole/pi-hole.git
synced 2025-04-24 00:00:14 +00:00
Use heredocs instead of multiple calls to echo
There were a lot of places (like in help functions) that used multiple echo calls instead of heredocs. Personal opinion but this seems cleaner.
This commit is contained in:
parent
28eeaf201b
commit
0efda04920
6 changed files with 68 additions and 57 deletions
|
@ -72,19 +72,21 @@ coreOutput() {
|
|||
}
|
||||
|
||||
helpFunc() {
|
||||
echo ":::"
|
||||
echo "::: Show Pi-hole/Web Admin versions"
|
||||
echo ":::"
|
||||
echo "::: Usage: pihole -v [ -a | -p ] [ -l | -c ]"
|
||||
echo ":::"
|
||||
echo "::: Options:"
|
||||
echo "::: -a, --admin Show both current and latest versions of web admin"
|
||||
echo "::: -p, --pihole Show both current and latest versions of Pi-hole core files"
|
||||
echo "::: -l, --latest (Only after -a | -p) Return only latest version"
|
||||
echo "::: -c, --current (Only after -a | -p) Return only current version"
|
||||
echo "::: -h, --help Show this help dialog"
|
||||
echo ":::"
|
||||
exit 0
|
||||
cat << EOM
|
||||
:::
|
||||
::: Show Pi-hole/Web Admin versions
|
||||
:::
|
||||
::: Usage: pihole -v [ -a | -p ] [ -l | -c ]
|
||||
:::
|
||||
::: Options:
|
||||
::: -a, --admin Show both current and latest versions of web admin
|
||||
::: -p, --pihole Show both current and latest versions of Pi-hole core files
|
||||
::: -l, --latest (Only after -a | -p) Return only latest version
|
||||
::: -c, --current (Only after -a | -p) Return only current version
|
||||
::: -h, --help Show this help dialog
|
||||
:::
|
||||
EOM
|
||||
exit 1
|
||||
}
|
||||
|
||||
if [[ $# = 0 ]]; then
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue