forked from phanirithvij/twist.moe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup.sh
executable file
·44 lines (43 loc) · 926 Bytes
/
setup.sh
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
32
33
34
35
36
37
38
39
40
41
42
43
44
#!/bin/bash
py=false
if command -v python &>/dev/null
then
echo Python is installed
py=true
else
echo Python is not installed
fi
if command -v python3 &>/dev/null
then
echo Python 3 is installed
py=true
else
echo Python 3 is not installed
fi
if [ ! $py ]
then
echo 'Python not found'
echo 'Install using sudo?(Y/n)'
read installpy
if [ $installpy == "Y" -o $installpy == "y" -o $installpy == "yes" ]
then
sudo apt-get install python python3 python-pip python3-pip
echo 'Python installed'
fi
fi
if $py
then
python -c "import Crypto" &>/dev/null
if [ $? -ne 0 ]
then
echo 'Install Crypto for python'
sudo pip install Crypto
fi
python -c "import hashlib" &>/dev/null
if [ $? -ne 0 ]
then
echo 'Install hashlib for python'
sudo pip install hashlib
fi
echo 'Crypto, hashlib for python installed'
fi