dev: fix missing global flag in README.txt creation

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-01-23 09:21:28 +01:00
parent 13052f01da
commit 121f131bb4
4 changed files with 20 additions and 15 deletions

View File

@ -390,6 +390,6 @@ It features background tasks and interactive chats, and can serve as an interfac
<p>@Gnadelwartz</p>
<h2>That's it all guys!</h2>
<p>If you feel that there's something missing or if you found a bug, feel free to submit a pull request!</p>
<h4>$$VERSION$$ v1.30-0-g3266427</h4>
<h4>$$VERSION$$ v1.32-dev-9-g13052f0</h4>
</body>
</html>

View File

@ -238,4 +238,4 @@ See `mycommnds.sh.dist` for an example.
If you feel that there's something missing or if you found a bug, feel free to submit a pull request!
#### $$VERSION$$ v1.32-dev-8-g2960e58
#### $$VERSION$$ v1.32-dev-9-g13052f0

View File

@ -39,18 +39,21 @@ Linted by #ShellCheck
Prerequisites
Uses JSON.sh [http://github.com/dominictarr/JSON.sh]/JSON.awk and the magic of sed.
Uses JSON.sh [http://github.com/dominictarr/JSON.sh]/JSON.awk [https://github.com/step-/
JSON.awk] and the magic of sed.
Bashbot is written in bash. It depends on commands typically available in a Linux/Unix
Environment. For more information on commands provided by recent versions of coreutils
[https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands], busybox or toybox,
see Developer_Notes.
[https://en.wikipedia.org/wiki/List_of_GNU_Core_Utilities_commands], busybox [https://
en.wikipedia.org/wiki/BusyBox#Commands] or toybox [https://landley.net/toybox/help.html],
see Developer Notes [doc/7_develop.md#common-commands].
Note for MacOS and BSD Users: Bashbot will not run without installing additional software
as it uses modern bash and (gnu) grep/sed features. See Install Bashbot [doc/
0_install.md].
Note for embedded systems: You need to install a "real" bash as the vanilla installation
of busybox or toybox is not sufficient. See Install Bashbot [doc/0_install.md].
Bashbot Documentation [https://github.com/topkecleon/telegram-bot-bash] and Downloads are
available on www.github.com.
Bashbot Documentation [https://github.com/topkecleon/telegram-bot-bash] and Downloads
[https://github.com/topkecleon/telegram-bot-bash/releases] are available on www.github.com
[https://www.github.com].
Documentation
@ -115,7 +118,8 @@ Documentation
Your very first bashbot in a nutshell
To install and run bashbot you need access to a Linux/Unix command line with bash, a
Telegram client [https://telegram.org] and a mobile phone with_a_Telegram_account.
Telegram client [https://telegram.org] and a mobile phone with a Telegram account [https:/
/telegramguide.com/create-a-telegram-account/].
First you need to create a new Telegram Bot token [doc/1_firstbot.md] for your bot and
write it down.
Now open a Linux/Unix terminal with bash, create a new directory, change to it and install
@ -200,10 +204,11 @@ does). One of the powerful features of Unix shells is variable and command subst
using ${} and$() can lead to remote code execution (RCE) or remote information disclosure
(RID) bugs if unescaped $ is included in untrusted input (e.g. $$ or $(rm -rf /*)).
A powerful tool to improve your scripts is shellcheck. You can use it online [https://
www.shellcheck.net/] or install_shellcheck_locally. Shellcheck is used extensively in
bashbot development to ensure a high code quality (e.g. it's not allowed to push changes
without passing all shellcheck tests). In addition bashbot has a test_suite to check if
important functionality is working as expected.
www.shellcheck.net/] or install shellcheck locally [https://github.com/koalaman/
shellcheck#installing]. Shellcheck is used extensively in bashbot development to ensure a
high code quality (e.g. it's not allowed to push changes without passing all shellcheck
tests). In addition bashbot has a test suite [doc/7_develop.md] to check if important
functionality is working as expected.
Use printf whenever possible
@ -309,5 +314,5 @@ That's it all guys!
If you feel that there's something missing or if you found a bug, feel free to submit a
pull request!
$$VERSION$$ v1.30-0-g3266427
$$VERSION$$ v1.32-dev-9-g13052f0

View File

@ -1,6 +1,6 @@
#!/bin/bash
#
#### $$VERSION$$ v1.32-dev-4-g407194b
#### $$VERSION$$ v1.32-dev-9-g13052f0
# shellcheck disable=SC2016
#
# Easy Versioning in git:
@ -54,7 +54,7 @@ if [[ "${FILES}" == *"README.md"* ]]; then
cat "doc/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 |\
sed -E 's/<a href="([^>]+)">([^<#]+)<\/a>/\2 [\1]/g' <README.html |\
html2text -style pretty -width 90 - >>README.txt
else
type -f fold >/dev/null && fold -s -w 90 README.md >>README.txt