mirror of
https://github.com/octoleo/telegram-bot-bash.git
synced 2025-01-29 16:48:24 +00:00
fix help if not in bashbot dir
This commit is contained in:
parent
4ab8ebd298
commit
b9c8dc0ff8
@ -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
|
||||
|
@ -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 <bashbot.sh | base64)'"'|base64 -d|gunzip >"$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 <bashbot.sh | base64)'"'|base64 -d|gunzip >a;export BASHBOT_HOME="$a";chmod +x a;./a "$@";a="$PWD";cd ..;rm -rf "$a"'
|
||||
} >"${outfile}"
|
||||
|
||||
chmod +x "${outfile}"
|
||||
|
Loading…
x
Reference in New Issue
Block a user