diff --git a/dev/make-html.sh b/dev/make-html.sh
index c978c22..2b7fef5 100644
--- a/dev/make-html.sh
+++ b/dev/make-html.sh
@@ -7,7 +7,7 @@
#
# Usage: source make-hmtl
#
-#### $$VERSION$$ v1.25-dev-14-g2fe6d4b
+#### $$VERSION$$ v1.30-dev-21-g550a0de
##############################################################
# check for correct dir
@@ -36,7 +36,8 @@ else
'printf "."; pandoc -s -f commonmark -M "title=Bashobot Documentation - ${0%.md}.html" "$0" -o "${0%.md}.html"' {} \;
fi
# final: convert links from *.md to *.html
- find README.html html "${EXAMPLES}" -iname "*.html" -type f -exec sh -c\
+ # shellcheck disable=SC2248
+ find README.html html ${EXAMPLES} -iname "*.html" -type f -exec sh -c\
'sed -i -E "s/href=\"(\.\.\/)*doc\//href=\"\1html\//g;s/href=\"(.*).md(#.*)*\"/href=\"\1.html\"/g" $0' {} \;
printf " Done!\n"
fi
diff --git a/dev/make-standalone.sh b/dev/make-standalone.sh
index 1cfbcd9..723f193 100755
--- a/dev/make-standalone.sh
+++ b/dev/make-standalone.sh
@@ -6,10 +6,12 @@
# Description:
# even after make-distribution.sh bashbot is not self contained as it was in the past.
#
+# Options: --notest
+#
# 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.30-dev-20-g541a279
+#### $$VERSION$$ v1.30-dev-21-g550a0de
###################################################################
#shellcheck disable=SC1090
@@ -18,17 +20,26 @@ source "${0%/*}/dev.inc.sh"
#DISTNAME="telegram-bot-bash"
DISTDIR="./STANDALONE"
-DISTFILES="bashbot.sh bashbot.rc commands.sh mycommands.sh dev/obfuscate.sh modules scripts logs LICENSE README.* doc botacl botconfig.jssh"
+DISTMKDIR="data-bot-bash logs"
+DISTFILES="bashbot.sh bashbot.rc commands.sh mycommands.sh dev/obfuscate.sh modules scripts addons LICENSE README.* doc botacl botconfig.jssh"
# run pre_commit on files
-dev/hooks/pre-commit.sh
+[ "$1" != "--notest" ] && dev/hooks/pre-commit.sh
# create dir for distribution and copy files
+printf "Create directories and copy files\n"
mkdir -p "${DISTDIR}" 2>/dev/null
+
# shellcheck disable=SC2086
cp -r ${DISTFILES} "${DISTDIR}" 2>/dev/null
cd "${DISTDIR}" || exit 1
+# shellcheck disable=SC2250
+for dir in $DISTMKDIR
+do
+ [ ! -d "${dir}" ] && mkdir "${dir}"
+done
+
# inject JSON.sh into distribution
# shellcheck disable=SC1090
source "${BASE_DIR}/dev/inject-json.sh"
@@ -60,7 +71,7 @@ printf "\n... create unified bashbot.sh\n"
{
# first head of bashbot.sh
- sed -n '0,/for modules in/ p' bashbot.sh | head -n -3
+ sed -n '0,/for module in/ p' bashbot.sh | head -n -3
# then mycommands from first non comment line on
printf '\n##############################\n# bashbot modules starts here ...\n'