dev: make-standalone: include in distribution

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2021-03-05 20:12:30 +01:00
parent 761aa46b66
commit 47a032d582
2 changed files with 11 additions and 4 deletions

View File

@ -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"

View File

@ -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"