mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-28 04:45:00 +00:00
dev: move ascii art to bin/
This commit is contained in:
parent
4a9d1f0a29
commit
37e4539ef8
10
bashbot.sh
10
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
|
||||
|
@ -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 href="([^>]+)">([^<#]+)<\/a>/\2 [\1]/' <README.html |\
|
||||
html2text -style pretty -width 90 - >>README.txt
|
||||
|
Loading…
Reference in New Issue
Block a user