-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathrun.sh
More file actions
executable file
·39 lines (35 loc) · 838 Bytes
/
run.sh
File metadata and controls
executable file
·39 lines (35 loc) · 838 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
32
33
34
35
36
37
38
39
#!/bin/bash
echo "Welcome to my Piano";
echo "Installing requirments....";
echo
read -n1 -p "This script will install some essential python libraries, proceed? >_ [y/n]" proceed
echo
if [ "$proceed" = "n" ]
then
exit 1;
else
echo "Please type your sudo_password where is needed";
echo
read -n1 -p "Are you using python2.7 >_ [y/n]" py_answer
echo
if [ "$py_answer" = "y" ]
then
echo
echo "Provide your password "
echo
sed -i '2s/^/#/' Mypiano.py
sudo apt-get install python-pygame
sudo apt-get install python-tk
sudo apt-get install -y python-tk
python2 Mypiano.py
else
echo
echo "Provide Your Password"
sed -i '1s/^/#/' Mypiano.py
sudo apt-get install python3-tk
sudo apt-get install -y python3-tk
python3 -m pip install -U pygame --user
python3 Mypiano.py
fi
fi
sed -i '1,2s/^#//' Mypiano.py