implemented shell scripts, testing

This commit is contained in:
Bryson Steck 2022-03-11 17:01:39 -07:00
parent 9eb5b31022
commit 547e0a79df
2 changed files with 35 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# check if correct programs are installed
type git npm node python3 pip3
if [[ $! -ne 0 ]]; then
echo "install: one or more of the above programs are not installed. the programs in question have lines that end in \"not found\". please make sure that these programs are installed through your package manager"
exit 0
else
echo "install: required programs are installed, continuing"
fi
echo "install: installing requests python package for the source script"
pip3 install --user requests
echo "install: installing tmi node module for the twitch bot"
cd twitch-bot
npm install tmi.js
echo

17
run.sh
View file

@ -0,0 +1,17 @@
cd twitch-bot
node bot.js &
BOT_PID=$!
cd ../follow-src
python3 source.py &
SCRIPT_PID=$!
echo "The Twitch bot and Source script is now running. You can stop this script by typing \"stop\""
while read input; do
case $input in
stop) kill $BOT_PID; kill $SCRIPT_PID; break;;
esac
echo "You can stop this script by typing \"stop\""
done