diff options
author | Lyndon Brown <jnqnfe@gmail.com> | 2020-03-06 22:08:07 +0000 |
---|---|---|
committer | Luca Boccassi <bluca@debian.org> | 2020-03-10 12:45:23 +0000 |
commit | 9f1fdac303d281a0361a2d4fc554113a6b3c6eb7 (patch) | |
tree | 54e15a6307ecb7bea5d3a41513a38d73b73200ae /functions | |
parent | bc199a73b68b9b31327afbb1c32ff82661bcccf5 (diff) | |
download | vyos-live-build-9f1fdac303d281a0361a2d4fc554113a6b3c6eb7.tar.gz vyos-live-build-9f1fdac303d281a0361a2d4fc554113a6b3c6eb7.zip |
help/usage: simplify
Gbp-Dch: Ignore
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/help.sh | 19 | ||||
-rwxr-xr-x | functions/usage.sh | 19 |
2 files changed, 19 insertions, 19 deletions
diff --git a/functions/help.sh b/functions/help.sh index 35051ab1f..ab6442f1c 100755 --- a/functions/help.sh +++ b/functions/help.sh @@ -10,21 +10,22 @@ Help () { - printf "%s - %s\n\n" "${PROGRAM_NAME}" "${DESCRIPTION}" - printf "Usage:\n\n" + echo "${PROGRAM_NAME} - ${DESCRIPTION}" + printf "\nUsage:\n\n" - if [ -n "${USAGE}" ] - then - # printf without placeholder required here for correct \t and \n formatting of `lb config --usage` + if [ -n "${USAGE}" ]; then + # printf without placeholder required here for correct \t and \n formatting of `lb config` usage string printf " ${USAGE}\n" fi - printf " %s [-h|--help]\n" "${PROGRAM}" - printf " %s [-u|--usage]\n" "${PROGRAM}" - printf " %s [-v|--version]\n\n" "${PROGRAM}" + + echo " ${PROGRAM} [-h|--help]" + echo " ${PROGRAM} [-u|--usage]" + echo " ${PROGRAM} [-v|--version]" + echo if [ -n "${HELP}" ] then - printf "%s\n\n" "${HELP}" + printf "${HELP}\n\n" fi echo "Report bugs to the Live Systems project <https://wiki.debian.org/DebianLive>." diff --git a/functions/usage.sh b/functions/usage.sh index 06ad72132..794a45032 100755 --- a/functions/usage.sh +++ b/functions/usage.sh @@ -10,20 +10,19 @@ Usage () { - printf "%s - %s\n\n" "${PROGRAM_NAME}" "${DESCRIPTION}" - printf "Usage:\n\n" + echo "${PROGRAM_NAME} - ${DESCRIPTION}" + printf "\nUsage:\n\n" - if [ -n "${USAGE}" ] - then - # printf without placeholder required here for correct \t and \n formatting of `lb config --usage` + if [ -n "${USAGE}" ]; then + # printf without placeholder required here for correct \t and \n formatting of `lb config` usage string printf " ${USAGE}\n" fi - printf " %s [-h|--help]\n" "${PROGRAM}" - printf " %s [-u|--usage]\n" "${PROGRAM}" - printf " %s [-v|--version]\n" "${PROGRAM}" - - printf "\nTry \"%s --help\" for more information.\n" "${PROGRAM}" + echo " ${PROGRAM} [-h|--help]" + echo " ${PROGRAM} [-u|--usage]" + echo " ${PROGRAM} [-v|--version]" + echo + echo "Try \"${PROGRAM} --help\" for more information." exit 1 } |