-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch.sh
More file actions
executable file
·31 lines (26 loc) · 951 Bytes
/
Copy pathlaunch.sh
File metadata and controls
executable file
·31 lines (26 loc) · 951 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
if ! command -v python3 &>/dev/null; then
echo "it looks like python3 is not installed."
echo "if you think it's an error, try executing the file manually with 'python random_anime.py'"
echo "if indeed python is not installed please install the latest version on the official website or update python (>=3.7)"
exit 1
fi
answer_is_valid="False"
echo "By default, the launcher will try to download the required libraries."
echo "if you already have them installed you can skip by typing 'n'"
while [ "$answer_is_valid" != "True"]; do
read -p "install or update required libraries ?[y/n]:" answer
if [ "$answer" = "y"]; then
echo "Installing libraries"
pip3 install requests rich
$answer_is_valid="True"
elif [ "$answer" = "n"]; then
echo "Skipping libraries installation..."
$answer_is_valid="True"
else
echo "Invalid command"
fi
done
echo "Launching python file"
clear
python3 random_anime.py