diff --git a/.gitignore b/.gitignore index 7f19591..cda6e25 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ *~ -count -token +/count +/token *.save *.log -JSON.sh/* -tmp-bot-bash/ +/JSON.sh/* +/tmp-bot-bash/ diff --git a/README.md b/README.md index b200ee7..866165e 100644 --- a/README.md +++ b/README.md @@ -102,4 +102,4 @@ Bashbot is not more (in)secure as any other Bot written in any other language, w If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/README.txt b/README.txt index be85344..0f19273 100644 --- a/README.txt +++ b/README.txt @@ -166,5 +166,5 @@ That's it! If you feel that there's something missing or if you found a bug, feel free to submit a pull request! -latexmath:[\[VERSION\]] 0.70-dev-18-g7512681 +latexmath:[\[VERSION\]] 0.70-dev-26-gbca3e59 ++++++++++++++++++++++++++++++++++++++++++++ diff --git a/bashbot.rc b/bashbot.rc index 0126cfb..1e9d3fd 100755 --- a/bashbot.rc +++ b/bashbot.rc @@ -1,7 +1,7 @@ #!/bin/sh # description: Start or stop telegram-bash-bot # -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # shellcheck disable=SC2009 # shellcheck disable=SC2181 diff --git a/bashbot.sh b/bashbot.sh index 5e51463..3c983a6 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -10,7 +10,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ 0.70-dev-25-g0422cb0 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # # Exit Codes: # - 0 sucess (hopefully) diff --git a/commands.sh b/commands.sh index c4ff305..494d734 100755 --- a/commands.sh +++ b/commands.sh @@ -4,7 +4,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # # shellcheck disable=SC2154 # shellcheck disable=SC2034 diff --git a/dev/hooks/pre-commit.sh b/dev/hooks/pre-commit.sh index 5072df9..c803a23 100755 --- a/dev/hooks/pre-commit.sh +++ b/dev/hooks/pre-commit.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script diff --git a/dev/hooks/pre-push.sh b/dev/hooks/pre-push.sh index 57b7d89..9c7f720 100755 --- a/dev/hooks/pre-push.sh +++ b/dev/hooks/pre-push.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script diff --git a/dev/install-hooks.sh b/dev/install-hooks.sh index e841136..715c8e0 100755 --- a/dev/install-hooks.sh +++ b/dev/install-hooks.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # this has to run once atfer git clone # and every time we create new hooks -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script diff --git a/dev/shellcheck.files b/dev/shellcheck.files index 334f203..3f810d4 100644 --- a/dev/shellcheck.files +++ b/dev/shellcheck.files @@ -1,3 +1,3 @@ # list of additional files to check from shellcheck -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 bashbot.rc diff --git a/dev/version.sh b/dev/version.sh index 3f40703..364c5fc 100755 --- a/dev/version.sh +++ b/dev/version.sh @@ -1,6 +1,6 @@ #!/bin/bash # -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # shellcheck disable=SC2016 # # Easy Versioning in git: diff --git a/doc/1_firstbot.md b/doc/1_firstbot.md index 2163d1f..3253d5e 100644 --- a/doc/1_firstbot.md +++ b/doc/1_firstbot.md @@ -61,5 +61,5 @@ group. This step is up to you actually. #### [Next Getting started](2_usage.md) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/doc/2_usage.md b/doc/2_usage.md index 6f62d64..b592ac8 100644 --- a/doc/2_usage.md +++ b/doc/2_usage.md @@ -159,5 +159,5 @@ send_action "${CHAT[ID]}" "action" #### [Prev Create Bot](1_firstbot.md) #### [Next Advanced Usage](3_advanced.md) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/doc/3_advanced.md b/doc/3_advanced.md index 13d3770..34845a4 100644 --- a/doc/3_advanced.md +++ b/doc/3_advanced.md @@ -156,5 +156,5 @@ answer_inline_query "$iQUERY_ID" "cached_sticker" "identifier for the sticker" #### [Prev Advanced Usage](3_advanced.md) #### [Next Expert Use](4_expert.md) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/doc/4_expert.md b/doc/4_expert.md index 0d0ec65..5f59576 100644 --- a/doc/4_expert.md +++ b/doc/4_expert.md @@ -104,5 +104,5 @@ An example crontab is provided in ```examples/bashbot.cron```. #### [Prev Expert Use](4_expert.md) #### [Next Best Practice](5_practice.md) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/doc/5_practice.md b/doc/5_practice.md index 531777e..71e6058 100644 --- a/doc/5_practice.md +++ b/doc/5_practice.md @@ -112,5 +112,5 @@ The second warning is about an unused variable, this is true because in our exam #### [Prev Best Practice](5_practice.md) #### [Next Functions Reference](6_reference.md) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/doc/6_reference.md b/doc/6_reference.md index 2925edb..c192d6e 100644 --- a/doc/6_reference.md +++ b/doc/6_reference.md @@ -348,5 +348,5 @@ Send Input from Telegram to waiting Interactive Chat. #### [Prev Best Practice](5_practice.md) #### [Next Developer Rules](7_develop.md) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/doc/7_develop.md b/doc/7_develop.md index 8e985c2..477c9a5 100644 --- a/doc/7_develop.md +++ b/doc/7_develop.md @@ -70,5 +70,5 @@ fi #### [Prev Function Reference](6_function.md) -#### $$VERSION$$ 0.70-dev-20-g753f1b3 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 diff --git a/examples/bashbot.cron b/examples/bashbot.cron index b23505b..86689aa 100644 --- a/examples/bashbot.cron +++ b/examples/bashbot.cron @@ -7,7 +7,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 SHELL=/bin/sh diff --git a/examples/calc.sh b/examples/calc.sh index 400e805..2e72055 100755 --- a/examples/calc.sh +++ b/examples/calc.sh @@ -3,7 +3,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # adjust your language setting here # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment diff --git a/examples/notify.sh b/examples/notify.sh index 2a3b859..32ca2af 100755 --- a/examples/notify.sh +++ b/examples/notify.sh @@ -2,7 +2,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # adjust your language setting here # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment diff --git a/examples/question,sh b/examples/question,sh index 2f9ac95..2f23254 100755 --- a/examples/question,sh +++ b/examples/question,sh @@ -3,7 +3,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # adjust your language setting here # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment diff --git a/examples/question.sh b/examples/question.sh index 2f9ac95..2f23254 100755 --- a/examples/question.sh +++ b/examples/question.sh @@ -3,7 +3,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) -#### $$VERSION$$ 0.70-dev-18-g7512681 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # adjust your language setting here # https://github.com/topkecleon/telegram-bot-bash#setting-up-your-environment diff --git a/test/ALL-tests.inc.sh b/test/ALL-tests.inc.sh index 72f1e52..d75daf4 100755 --- a/test/ALL-tests.inc.sh +++ b/test/ALL-tests.inc.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-23-g48e6f64 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # common variables export TESTME DIRME TESTDIR LOGFILE REFDIR TESTNAME @@ -19,13 +19,13 @@ export TOKENFILE ACLFILE COUNTFILE ADMINFILE # SUCCESS NOSUCCES export SUCCESS NOSUCCESS -SUCCESS=" OK" -NOSUCCESS=" FAILED!" + SUCCESS=" OK" + NOSUCCESS=" FAILED!" # default input, reference and output files -INPUTFILE="${DIRME}/${REFDIR}/${REFDIR}.input" -REFFILE="${DIRME}/${REFDIR}/${REFDIR}.result" -OUTPUTFILE="${TESTDIR}/${REFDIR}.out" + INPUTFILE="${DIRME}/${REFDIR}/${REFDIR}.input" + REFFILE="${DIRME}/${REFDIR}/${REFDIR}.result" + OUTPUTFILE="${TESTDIR}/${REFDIR}.out" # print arrays in reproducible order print_array() { diff --git a/test/ALL-tests.sh b/test/ALL-tests.sh index ef2419e..471e62e 100755 --- a/test/ALL-tests.sh +++ b/test/ALL-tests.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash # this has to run once atfer git clone # and every time we create new hooks -#### $$VERSION$$ 0.70-dev-23-g48e6f64 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script @@ -10,7 +10,8 @@ cd "${GIT_DIR}/.." || exit 1 # create test environment TESTENV="/tmp/bashbot.test$$" -cp -r . "${TESTENV}" +mkdir "${TESTENV}" +cp -r * "${TESTENV}" cd "test" || exit 1 #set -e @@ -44,8 +45,10 @@ if [ "$fail" -eq 0 ]; then else /bin/echo -n 'FAILURE ' exitcode=1 - echo "To analyse error see ${TESTENV}" + rm -rf "${TESTENV}/test" + find "${TESTENV}/"* ! -name '[a-z]-*' -delete fi echo "${passed} / ${tests}" +[ -d "${TESTENV}" ] && echo "Logfiles from run are in ${TESTENV}" exit ${exitcode} diff --git a/test/a-commit-test.sh b/test/a-commit-test.sh index 161ab93..5cba6ca 100644 --- a/test/a-commit-test.sh +++ b/test/a-commit-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-23-g48e6f64 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 ../dev/hooks/pre-commit.sh diff --git a/test/a-push-test.sh b/test/a-push-test.sh index 26a5a26..c169f8c 100644 --- a/test/a-push-test.sh +++ b/test/a-push-test.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-23-g48e6f64 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 ../dev/hooks/pre-push.sh diff --git a/test/c-init-test.sh b/test/c-init-test.sh index a13cec5..b5d6d6f 100755 --- a/test/c-init-test.sh +++ b/test/c-init-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-23-g48e6f64 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # include common functions and definitions # shellcheck source=test/ALL-tests.inc.sh diff --git a/test/d-process_message-test.sh b/test/d-process_message-test.sh index 9156691..ab59127 100755 --- a/test/d-process_message-test.sh +++ b/test/d-process_message-test.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ 0.70-dev-23-g48e6f64 +#### $$VERSION$$ 0.70-dev-26-gbca3e59 # include common functions and definitions # shellcheck source=test/ALL-tests.inc.sh