diff --git a/dev/make-distribution.sh b/dev/make-distribution.sh index ab0153b..0a35fa8 100755 --- a/dev/make-distribution.sh +++ b/dev/make-distribution.sh @@ -7,7 +7,7 @@ # # Options: --notest - skip tests # -#### $$VERSION$$ v1.45-dev-75-gfdb2b3a +#### $$VERSION$$ v1.45-dev-82-g761aa46 ############################################################## #shellcheck disable=SC1090 @@ -20,6 +20,7 @@ DISTDIR="./DIST/${DISTNAME}" DISTMKDIR="data-bot-bash logs bin bin/logs addons" DISTFILES="bashbot.sh commands.sh mycommands.sh.clean bin doc examples scripts modules LICENSE README.md README.txt README.html" +DISTFILESDEV="dev/make-standalone.sh dev/dev.inc.sh dev/inject-json.sh dev/make-html.sh dev/obfuscate.sh" DISTFILESDIST="mycommands.sh mycommands.conf bashbot.rc $(echo "addons/"*.sh)" # run tests first! @@ -39,6 +40,9 @@ mkdir -p "${DISTDIR}" 2>/dev/null printf "Copy files\n" # shellcheck disable=SC2086 cp -r ${DISTFILES} "${DISTDIR}" +mkdir "${DISTDIR}/dev" +# shellcheck disable=SC2086 +cp ${DISTFILESDEV} "${DISTDIR}/dev" cd "${DISTDIR}" || exit 1 printf "Create directories\n" diff --git a/dev/make-standalone.sh b/dev/make-standalone.sh index 90819eb..4f48c61 100755 --- a/dev/make-standalone.sh +++ b/dev/make-standalone.sh @@ -11,12 +11,14 @@ # 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$$ v1.45-dev-81-ga5b2306 +#### $$VERSION$$ v1.45-dev-82-g761aa46 ################################################################### +incfile="${0%/*}/dev.inc.sh" #shellcheck disable=SC1090 -source "${0%/*}/dev.inc.sh" +[ -f "${incfile}" ] && source "${incfile}" [ ! -f "bashbot.sh" ] && printf "bashbot.sh not found in %s\n" " $(pwd)" && exit 1 +[ -z "${BASE_DIR}" ] && BASE_DIR="$(pwd)" #DISTNAME="telegram-bot-bash" DISTDIR="./STANDALONE" @@ -24,7 +26,7 @@ DISTMKDIR="data-bot-bash logs bin bin/logs addons" DISTFILES="bashbot.sh bashbot.rc commands.sh mycommands.sh dev/obfuscate.sh modules bin scripts LICENSE README.* doc botacl botconfig.jssh addons" # run pre_commit on files -[ "$1" != "--notest" ] && dev/hooks/pre-commit.sh +[[ -f ""${incfile} && "$1" != "--notest" ]] && dev/hooks/pre-commit.sh # create dir for distribution and copy files printf "Create directories and copy files\n" @@ -41,6 +43,7 @@ do done # inject JSON.sh into distribution + # shellcheck disable=SC1090 source "${BASE_DIR}/dev/inject-json.sh"