This repository has been archived by the owner on Oct 6, 2021. It is now read-only.
forked from PiInTheSky/pits
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall
executable file
·105 lines (87 loc) · 2.17 KB
/
install
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#!/bin/bash
function disable_bt {
echo "Detected Raspberry Pi 3...Disabling Bluetooth"
if grep -q pi3-disable-bt "/boot/config.txt"; then
echo 'Bluetooth Disabled'
else
echo 'dtoverlay=pi3-disable-bt' | sudo tee -a /boot/config.txt
echo 'Bluetooth Disabled'
fi
sudo systemctl disable hciuart
}
echo "Pi in the Sky - Installation"
echo "============================"
sleep 2
echo -e "\n\nInstalling git..."
sleep 1
echo -e "\n\nSetting up serial ports..."
sleep 1
sudo systemctl mask [email protected]
sudo sed -e "s/console=serial0,115200//g" -i.backup /boot/cmdline.txt
echo -e "\n\nEnabling OneWire support..."
sleep 1
sudo raspi-config nonint do_onewire 0 #Default
rev=$(cat /proc/cpuinfo|grep Revision|awk -F: '$0=$2'|tr -d ' ' )
case "$rev" in
a02082)
disable_bt
;;
a22082)
disable_bt
;;
*)
echo "No bluetooth to disable"
;;
esac
read -rp $'\n\nDo you want to enable the camera? [Y,n]' choice
case $choice in
n|N) ;;
*) sudo raspi-config nonint do_camera 0 ;;
esac
read -rp $'\n\nAre you using Lora transmisssion? [Y,n]' choice
case $choice in
n|N) ;;
*) sudo raspi-config nonint do_spi 0 ;;
esac
read -rp $'\n\nEnable I2C? [Y,n]' choice
case $choice in
n|N) ;;
*) sudo raspi-config nonint do_i2c 0 ;;
esac
read -rp $'\n\nAre you using a USB Webcam[y,N]' choice
case $choice in
n|N) ;;
*)
echo "Installing fswebcam"
echo "==================="
sleep 3
sudo apt-get install fswebcam ;;
esac
echo -e "\n\nInstalling PiGPIO"
echo "================="
sleep 3
cd
wget abyz.co.uk/rpi/pigpio/pigpio.zip
unzip pigpio.zip
cd PIGPIO
make
sudo make install
echo -e "\n\nInstalling Wiring Pi"
echo "===================="
sleep 3
cd
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
echo -e "\n\nInstalling SSDV"
echo "==============="
sleep 3
cd
git clone https://github.com/fsphil/ssdv.git
cd ssdv
sudo make install
echo -e "\n\nInstalling Pi in the Sky Software"
echo "================================="
cd
cd pits
./build