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:
Marcus Hildum 2016-10-19 20:46:37 -07:00
parent 28eeaf201b
commit 0efda04920
6 changed files with 68 additions and 57 deletions

View file

@ -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