diff --git a/bashbot.sh b/bashbot.sh index 13077f8..905bc9b 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$$ 0.99-7-gafbdb1e +#### $$VERSION$$ 0.99-9-g4ab8ebd # # Exit Codes: # - 0 success (hopefully) @@ -109,7 +109,7 @@ fi BOTCOMMANDS="start, stop, status, help, init, stats, broadcast, suspendback, resumeback, killback" [[ -z "$1" && -z "${SOURCE}" ]] && echo -e "${ORANGE}Available commands: ${GREY}${BOTCOMMANDS}${NC}" && exit if [ "$1" = "help" ]; then - HELP="README" + HELP="${BASHBOT_HOME:-.}/README" if [ -n "${CLEAR}" ];then _exists w3m && w3m "$HELP.html" && exit _exists lynx && lynx "$HELP.html" && exit diff --git a/dev/obfuscate.sh b/dev/obfuscate.sh index c4ca168..ae37c0a 100755 --- a/dev/obfuscate.sh +++ b/dev/obfuscate.sh @@ -9,8 +9,8 @@ outfile="./bashbot.obf.sh" { echo '#!/bin/bash' -echo 'b="./bashbot";h="$PWD";cd "$(mktemp -d)"||exit' -echo 'printf '"'%s\n'"' '"'$(gzip -9 "$b";export BASHBOT_HOME="$h";chmod +x "$b";"$b" "$@";b="$(pwd)";cd ..;rm -rf "$b"' +echo 'a="$PWD";cd "$(mktemp -d)"||exit' +echo 'printf '"'%s\n'"' '"'$(gzip -9 a;export BASHBOT_HOME="$a";chmod +x a;./a "$@";a="$PWD";cd ..;rm -rf "$a"' } >"${outfile}" chmod +x "${outfile}"