mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2024-12-26 04:17:46 +00:00
dev: make-standalone: improvments, extra files, make-dist: exclude test
This commit is contained in:
parent
ae525c47e0
commit
41e6883817
@ -21,7 +21,7 @@ USAGE='process_update.sh [-h|--help] [-s|--startbot] [-w|--watch] [-n|--lines n]
|
||||
# AUTHOR: KayM (gnadelwartz), kay@rrr.de
|
||||
# CREATED: 27.02.2021 13:14
|
||||
#
|
||||
#### $$VERSION$$ v1.45-dev-80-g2463866
|
||||
#### $$VERSION$$ v1.45-dev-84-gae525c4
|
||||
#===============================================================================
|
||||
|
||||
####
|
||||
@ -62,7 +62,7 @@ if [ -n "${startbot}" ]; then
|
||||
# warn when starting bot without pipe
|
||||
[ -p "${file}" ] || printf "%(%c)T: %b\n" -1 "${ORANGE}Warning${NC}: File is not a pipe:${GREY} ${file##*/}${NC}"
|
||||
start_bot "$2" "webhook"
|
||||
printf "%(%c)T: %b\n" -1 "${GREEN}Bot start actions done, start reading updates ....${NN}"
|
||||
printf "%(%c)T: %b\n" -1 "${GREEN}Bot start actions done, start reading updates ....${NC}"
|
||||
fi
|
||||
# check file exist
|
||||
if [[ ! -r "${file}" || -d "${file}" ]]; then
|
||||
@ -74,7 +74,7 @@ fi
|
||||
# ready, do stuff here -----
|
||||
|
||||
# kill all sub processes on exit
|
||||
trap 'kill $(jobs -p) 2>/dev/null; send_normal_message "'"${BOTADMIN}"'" "Bot '"${BOTNAME}"' webhook stopped ..."; printf "%(%c)T: %s\n" -1 "Bot in batch mode killed!\n"' EXIT HUP QUIT
|
||||
trap 'kill $(jobs -p) 2>/dev/null; send_normal_message "'"${BOTADMIN}"'" "Bot '"${BOTNAME}"' webhook stopped ..."; printf "%(%c)T: %s\n" -1 "Bot in batch mode killed!"' EXIT HUP QUIT
|
||||
|
||||
# wait after (first) update to avoid processing to many in parallel
|
||||
UPDWAIT="0.5"
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
# Options: --notest - skip tests
|
||||
#
|
||||
#### $$VERSION$$ v1.45-dev-83-g47a032d
|
||||
#### $$VERSION$$ v1.45-dev-84-gae525c4
|
||||
##############################################################
|
||||
|
||||
#shellcheck disable=SC1090
|
||||
@ -20,7 +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/inject-json.sh dev/make-html.sh dev/obfuscate.sh"
|
||||
DISTFILESDEV="dev/make-standalone.sh dev/make-standalone.sh.include dev/inject-json.sh dev/make-html.sh dev/obfuscate.sh"
|
||||
DISTFILESDIST="mycommands.sh mycommands.conf bashbot.rc $(echo "addons/"*.sh)"
|
||||
|
||||
# run tests first!
|
||||
@ -40,7 +40,7 @@ mkdir -p "${DISTDIR}" 2>/dev/null
|
||||
printf "Copy files\n"
|
||||
# shellcheck disable=SC2086
|
||||
cp -r ${DISTFILES} "${DISTDIR}"
|
||||
mkdir "${DISTDIR}/dev"
|
||||
mkdir -p "${DISTDIR}/dev"
|
||||
# shellcheck disable=SC2086
|
||||
cp ${DISTFILESDEV} "${DISTDIR}/dev"
|
||||
cd "${DISTDIR}" || exit 1
|
||||
|
@ -1,5 +1,7 @@
|
||||
STANDALONE
|
||||
data-bot-bash/*
|
||||
webhook-fifo
|
||||
test
|
||||
webhook-fifo*
|
||||
JSON.awk
|
||||
bashbot.rc
|
||||
mycommands.sh
|
||||
|
@ -11,7 +11,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$$ v1.45-dev-83-g47a032d
|
||||
#### $$VERSION$$ v1.45-dev-84-gae525c4
|
||||
###################################################################
|
||||
|
||||
# include git config and change to base dir
|
||||
@ -37,9 +37,12 @@ fi
|
||||
#DISTNAME="telegram-bot-bash"
|
||||
DISTDIR="./STANDALONE"
|
||||
DISTMKDIR="data-bot-bash logs bin/logs addons"
|
||||
DISTFILES="bashbot.sh bashbot.rc commands.sh mycommands.sh dev/obfuscate.sh modules scripts LICENSE README.* doc botacl botconfig.jssh addons"
|
||||
DISTFILES="bashbot.sh bashbot.rc commands.sh mycommands.sh modules scripts LICENSE README.* doc botacl botconfig.jssh addons"
|
||||
DISTBINFILES="bin/bashbot_env.inc.sh bin/bashbot_stats.sh bin/process_batch.sh bin/process_update.sh bin/send_broadcast.sh bin/send_message.sh"
|
||||
|
||||
# add extra files
|
||||
DISTFILES+=" $(cat "${BASE_DIR}/dev/${0##*/}.include")"
|
||||
|
||||
# create dir for distribution and copy files
|
||||
printf "Create directories and copy files\n"
|
||||
mkdir -p "${DISTDIR}/bin" 2>/dev/null
|
||||
|
1
dev/make-standalone.sh.include
Normal file
1
dev/make-standalone.sh.include
Normal file
@ -0,0 +1 @@
|
||||
dev/obfuscate.sh
|
Loading…
Reference in New Issue
Block a user