refactor: improve templater formatting

This commit is contained in:
Price Hiller 2023-09-15 17:21:43 -05:00
parent 1e4740a08f
commit 7e66668f98
No known key found for this signature in database

View File

@ -380,8 +380,8 @@ usage() {
# POSIX Compliant:
# Yes
#
printf "Usage: %s\n" \
"$(basename "${0}") [OPTIONS]
cat <<EOF
Usage: $(basename ${0}) [OPTIONS]
$(arg_required "REQUIRED")
$(arg_optional "OPTIONAL")
@ -410,7 +410,8 @@ usage() {
$(arg_description "Do not exit on any errors, continue executing
Example:
--no-exit")"
--no-exit")
EOF
}
@ -474,7 +475,7 @@ main() {
shift
done
[[ -z "${template_file}" ]] &&
log "error" "No template file provided, exiting" &&
log "error" "No template file provided, exiting! Check \`-h\` for help." &&
exit 1
templater "${template_file}"
}