From 03f22c90c0826fe10d5f48505526dda442f36bd4 Mon Sep 17 00:00:00 2001 From: "Kay Marquardt (Gnadelwartz)" Date: Tue, 23 Apr 2019 20:37:15 +0200 Subject: [PATCH] add _is_function --- bashbot.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bashbot.sh b/bashbot.sh index 076ba95..530239f 100755 --- a/bashbot.sh +++ b/bashbot.sh @@ -10,7 +10,7 @@ # This file is public domain in the USA and all free countries. # Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying) # -#### $$VERSION$$ v0.70-dev2-13-gca73be8 +#### $$VERSION$$ v0.70-dev2-14-g56a45aa # # Exit Codes: # - 0 sucess (hopefully) @@ -516,6 +516,10 @@ inproc() { tmux send-keys -t "$copname" "${MESSAGE[0]} ${URLS[*]} " } +_is_function() +{ + [ "$(LC_ALL=C type -t "$1")" = "function" ] +} process_updates() { MAX_PROCESS_NUMBER=$(echo "$UPDATE" | sed '/\["result",[0-9]*\]/!d' | tail -1 | sed 's/\["result",//g;s/\].*//g') for ((PROCESS_NUMBER=0; PROCESS_NUMBER<=MAX_PROCESS_NUMBER; PROCESS_NUMBER++)); do