diff --git a/dev/hooks/pre-commit.sh b/dev/hooks/pre-commit.sh index 1308ea9..a6130fd 100755 --- a/dev/hooks/pre-commit.sh +++ b/dev/hooks/pre-commit.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -#### $$VERSION$$ v1.2-pre2-0-ga1773cc +#### $$VERSION$$ v1.2-pre2-1-gb5caff0 ############ # NOTE: you MUST run install-hooks.sh again when updating this file! @@ -49,7 +49,7 @@ VERSION="$(git describe --tags | sed -e 's/-.*//' -e 's/v//' -e 's/,/./')" # LOCAL version must greater than latest REMOTE release version echo "Update Version of modified files" -if (( $(echo "${VERSION} >= ${REMOTEVER}" | bc -l) )); then +if ! command -v bc &> /dev/null || (( $(echo "${VERSION} >= ${REMOTEVER}" | bc -l) )); then # update version in bashbot files on push set +f [ -f "${LASTPUSH}" ] && LASTFILES="$(find ./* -newer "${LASTPUSH}")" diff --git a/doc/7_develop.md b/doc/7_develop.md index 037692e..25724b3 100644 --- a/doc/7_develop.md +++ b/doc/7_develop.md @@ -190,7 +190,7 @@ Now have a look at the directory 'standalone', here you find the files 'bashbot. ### Setup your develop environment -1. install git, install [shellcheck](5_practice.md#Test-your-Bot-with-shellcheck), install pandoc +1. install the commands git, [shellcheck](5_practice.md#Test-your-Bot-with-shellcheck), bc, pandoc, bc, codespell 2. setup your [environment for UTF-8](4_expert.md#Setting-up-your-Environment) 3. clone your bashbot fork to a new directory ```git clone https://github.com//telegram-bot-bash.git```, replace `````` with your username on github 4. create and change to your develop branch ```git checkout -b ```, replace `````` with the name you want to name it, e.g. 'develop' @@ -349,5 +349,5 @@ fi #### [Prev Function Reference](6_reference.md) -#### $$VERSION$$ v1.2-pre2-0-ga1773cc +#### $$VERSION$$ v1.2-pre2-1-gb5caff0