diff --git a/bashbot.sh b/bashbot.sh index d42e672..65a17dc 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -11,7 +11,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.96-dev3-15-g3fcb854 +#### $$VERSION$$ v0.96-dev3-19-g8792e83 # # Exit Codes: # - 0 sucess (hopefully) diff --git a/dev/make-standalone.sh b/dev/make-standalone.sh index 916c1fe..7ad64a0 100755 --- a/dev/make-standalone.sh +++ b/dev/make-standalone.sh @@ -5,7 +5,7 @@ # If you your bot is finished you can use make-standalone.sh to create the # the old all-in-one bashbot: bashbot.sh and commands.sh only! # -#### $$VERSION$$ 0.96-dev2-6-gda98b09 +#### $$VERSION$$ v0.96-dev3-19-g8792e83 # magic to ensure that we're always inside the root of our application, # no matter from which directory we'll run script @@ -20,16 +20,8 @@ fi DISTDIR="./STANDALONE/${DISTNAME}" DISTFILES="bashbot.sh commands.sh mycommands.sh modules LICENSE README.txt token count botacl botadmin" -# run tests first! - -for test in dev/all-test*.sh -do - [ ! -x "${test}" ] && continue - if ! "${test}" ; then - echo "Test ${test} failed, can't create standalone!" - exit 1 - fi -done +# run pre_commit on files +dev/hooks/pre-commit.sh # create dir for distribution and copy files mkdir -p "${DISTDIR}" 2>/dev/null @@ -41,7 +33,7 @@ cd "${DISTDIR}" || exit 1 # here the magic starts # create all in one bashbot.sh file -echo "OK, noe lets do the magic ..." +echo "OK, now lets do the magic ..." echo " ... create unified commands.sh" { @@ -82,6 +74,11 @@ chmod +x bashbot.sh rm -rf modules +echo "Create minimized Version of bashbot.sh and commands.sh" +sed -E -e '/(shellcheck)|(#!\/bin\/bash)/! s/^[[:space:]]*#.*//' -e 's/^[[:space:]]*//' -e '/^$/d' bashbot.sh > bashbot.sh.min +sed -E -e '/(shellcheck)|(#!\/bin\/bash)/! s/^[[:space:]]*#.*//' -e 's/^[[:space:]]*//' -e '/^$/d' commands.sh > commands.sh.min +chmod +x bashbot.sh.min + echo "Done!" cd .. || exit 1 diff --git a/doc/4_expert.md b/doc/4_expert.md index ac9d486..db7e8a7 100644 --- a/doc/4_expert.md +++ b/doc/4_expert.md @@ -382,5 +382,5 @@ for every poll until the maximum of BASHBOT_SLEEP ms. #### [Prev Advanced Use](3_advanced.md) #### [Next Best Practice](5_practice.md) -#### $$VERSION$$ v0.96-dev3-16-gd11598e +#### $$VERSION$$ v0.96-dev3-17-g720dc59