diff --git a/bashbot.sh b/bashbot.sh index 337d393..b7e5df8 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -16,7 +16,7 @@ # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # # Usage: bashbot.sh [-h|--help|BOTCOMMANDS] - BOTCOMMANDS="start, stop, status, help, init, suspendback, resumeback, killback" +BOTCOMMANDS="--help help init start stop status suspendback resumeback killback" # # Exit Codes: # 0 - success (hopefully) @@ -30,7 +30,7 @@ # 8 - curl/wget missing # 10 - not bash! # -#### $$VERSION$$ v1.25-dev-39-gbd2d2e1 +#### $$VERSION$$ v1.25-dev-40-g4a9d1f0 ################################################################## # emmbeded system may claim bash but it is not @@ -167,9 +167,11 @@ RUNUSER="${USER}" # USER is overwritten by bashbot array :-(, save original # provide help case "$1" in - ""|"-h"*) [ -z "${SOURCE}" ] && printf "${ORANGE}Available commands: ${GREY}${BOTCOMMANDS}${NN}" && exit + "") [ -z "${SOURCE}" ] && printf "${ORANGE}Available commands: ${GREY}${BOTCOMMANDS}${NN}" && exit ;; - "--h"*) sed -nE -e '/(NOT EDIT)|(shellcheck)/d' -e '3,/###/p' <"$0" + "--h"*) LOGO="${BASHBOT_HOME:-.}/bin/bashbot.ascii" + [ -r "${LOGO}" ] && cat "${LOGO}" + sed -nE -e '/(NOT EDIT)|(shellcheck)/d' -e '3,/###/p' <"$0" exit;; "help") HELP="${BASHBOT_HOME:-.}/README" if [ -n "${INTERACTIVE}" ];then diff --git a/dev/version.sh b/dev/version.sh index 685d8eb..f1d1492 100755 --- a/dev/version.sh +++ b/dev/version.sh @@ -1,6 +1,6 @@ #!/bin/bash # -#### $$VERSION$$ v1.25-dev-39-gbd2d2e1 +#### $$VERSION$$ v1.25-dev-40-g4a9d1f0 # shellcheck disable=SC2016 # # Easy Versioning in git: @@ -56,8 +56,8 @@ FILES="$(find ./*)" if [[ "${FILES}" == *"README.md"* ]]; then FILES+=" README.html README.txt" type -f pandoc >/dev/null && pandoc -s -f commonmark -M "title=Bashbot README" README.md >README.html - cat "dev/bashbot.ascii" >"README.txt" - if [ -f "README.html" ] && type -f html2text >/dev/null; then + cat "bin/bashbot.ascii" >"README.txt" + if [ -r "README.html" ] && type -f html2text >/dev/null; then # convert html links to text [link] sed -E 's/([^<#]+)<\/a>/\2 [\1]/' >README.txt