-
Notifications
You must be signed in to change notification settings - Fork 2
/
install.sh
executable file
·36 lines (27 loc) · 974 Bytes
/
install.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
#!/bin/bash
this="$PWD"
cd ~
echo Copying pisstv script, replacing HOMEDIR with "$PWD"
sed s@HOMEDIR@"$PWD"@g "$this"/scripts/pisstv.sh > pisstv.sh
echo Setting pisstv script as executable
chmod +x pisstv.sh
echo Extracting PiFM
tar -xf "$this"/src/pifm.tar.gz
echo Patching pifm
patch -N -i "$this"/src/pifm.patch
echo Compiling pifm
g++ -o pifm pifm.c
echo Extracting PySSTV
tar -xvf "$this"/scripts/PySSTV-0.2.7.tar.gz
echo Installing Python Imaging
sudo apt-get update
sudo apt-get install python-imaging imagemagick
read -r -p \
'Do you want me to overwrite your /etc/rc.local with ours? If you have modified it, probably best not to... (y/N) ' overwrite
if [ "$overwrite" = "y" ]; then
echo Replacing rc.local, replacing HOMEDIR with "$PWD"
sed s@HOMEDIR@"$PWD"@g "$this"/config/rc.local | sudo tee /etc/rc.local
else
echo Please add \""$PWD"/pisstv.sh \&\" to your rc.local or equivalent
fi
echo All done. Reboot your Pi and it should start beeping!