-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInternetRadioInstall.sh
47 lines (47 loc) · 1.28 KB
/
InternetRadioInstall.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
45
46
47
#!/bin/sh
filename=$HOME/.local/share/InternetRadio/myradio.txt
if [ -e "$filename" ]
then
echo "$filename found, copying to /tmp"
cp $filename /tmp
else
echo "$filename not found"
fi
sharedapps=$HOME/.local/share/applications/
if [ -d "$sharedapps" ]
then
echo "$sharedapps found"
else
echo "$sharedapps not found"
mkdir $sharedapps
fi
echo "removing InternetRadio"
rm -rf ~/.local/share/InternetRadio
cd ~/.local/share/
echo "downloading InternetRadio ..."
wget https://github.com/Axel-Erfurt/InternetRadio/archive/master.zip
echo "unzip InternetRadio"
unzip -o master.zip
sleep 1
echo "remove zip file"
rm master.zip
mv ~/.local/share/InternetRadio-master ~/.local/share/InternetRadio
rf=/tmp/myradio.txt
if [ -e "$rf" ]
then
echo "restore myradio.txt"
cp $rf $HOME/.local/share/InternetRadio
else
echo "$rf not found"
fi
desktopfile=$HOME/.local/share/applications/InternetRadio.desktop
if [ -e "$desktopfile" ]
then
echo "$desktopfile already exists"
else
echo "$desktopfile not found"
cp $HOME/.local/share/InternetRadio/InternetRadio.desktop $HOME/.local/share/applications
fi
rm ~/Downloads/InternetRadioInstall.sh
echo "starting InternetRadio ... please use tray icon context menu with right mouse button"
python3 ~/.local/share/InternetRadio/myRadio.py