diff options
author | Linnea Gräf <nea@nea.moe> | 2024-10-17 12:44:39 +0200 |
---|---|---|
committer | Linnea Gräf <nea@nea.moe> | 2024-10-17 12:44:39 +0200 |
commit | b7bf0368732edbc9858035432ba86b6b9b23545c (patch) | |
tree | 31e6cff7eb72ebe46dd6a7bdabd4bf05d8bd266d /forgebot_proper.sh | |
parent | 6b85dda202b6305b38100a474037e5f05ed7b48d (diff) | |
download | forgebot-b7bf0368732edbc9858035432ba86b6b9b23545c.tar.gz forgebot-b7bf0368732edbc9858035432ba86b6b9b23545c.tar.bz2 forgebot-b7bf0368732edbc9858035432ba86b6b9b23545c.zip |
Add docker file
Diffstat (limited to 'forgebot_proper.sh')
-rwxr-xr-x | forgebot_proper.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/forgebot_proper.sh b/forgebot_proper.sh index e1a8971..947be04 100755 --- a/forgebot_proper.sh +++ b/forgebot_proper.sh @@ -1,4 +1,24 @@ #!/bin/bash + +program_exists() { + which "$1" >/dev/null + return $? +} +require_program() { + for prog in "$@"; do + if ! program_exists "$prog"; then + echo "Missing program: $prog" + exit 1 + fi + done +} +require_program curl jq websocat printf grep find sed mkdir touch rm mv mkfifo basename tty +if ! [[ "$(grep --version)" = *GNU* ]]; then + echo Using non-GNU grep. This can cause issues since we use some non standard grep options. + exit 1 +fi + + [[ -f "$(dirname -- "$0")"/env.sh ]] && source "$(dirname -- "$0")"/env.sh if [[ x"$ATROCITY_TOKEN" == x ]]; then echo "Please set ATROCITY_TOKEN to your discord token" |