-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathsetup.sh
executable file
·120 lines (102 loc) · 3.25 KB
/
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
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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
#!/bin/bash -e
# This file is part of pi-stomp.
#
# pi-stomp is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pi-stomp is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pi-stomp. If not, see <https://www.gnu.org/licenses/>.
#
# Usage and options
#
usage()
{
echo "Usage: $(basename $0) [-a <audio_card>] [-v <hardware_version>] [-p] [-m]"
echo ""
echo "Options:"
echo " -a <audio_card> Specify audio card (audioinjector-wm8731-audio | iqaudio-codec | hifiberry-dacplusadc)"
echo " -v <version> Specify hardware version"
echo " 1.0 : original pi-Stomp hardware (PCB v1)"
echo " 2.0 : most hardware (default)"
echo " -p Do not install default plugins and pedalboards"
echo " -m Enable MIDI via UART"
echo " -h Display this message"
}
hardware_version=2.0
has_ttymidi=false
plugins=true
while getopts 'a:v:pmh' o; do
case "${o}" in
a)
audio_card=${OPTARG}
;;
v)
hardware_version=${OPTARG}
;;
p)
plugins=false
;;
m)
has_ttymidi=true
;;
h)
usage
exit 0
;;
*)
usage 1>&2
exit 1
;;
esac
done
export has_ttymidi
#
# Hardware specific
#
if [ -z ${hardware_version+x} ]; then
printf "\nUsing default hardware configuration\n";
else
printf "\n===== pi-Stomp mods for hardware version specified =====\n"
${HOME}/pi-stomp/setup/pi-stomp-tweaks/modify_version.sh ${hardware_version}
fi
printf "\n===== OS update =====\n"
sudo apt-get update -y --allow-releaseinfo-change --fix-missing
printf "\n===== Audio card setup =====\n"
setup/audio/audiocard-setup.sh
if [ ! -z ${audio_card+x} ]; then
util/change-audio-card.sh ${audio_card} || (usage; exit 1)
fi
printf "\n===== Mod software install =====\n"
setup/mod/install.sh
printf "\n===== Mod software tweaks =====\n"
setup/mod-tweaks/mod-tweaks.sh
printf "\n===== Install pi-stomp package dependencies =====\n"
setup/pkgs/simple_install.sh
setup/pkgs/lilv_install.sh
setup/pkgs/mod-ttymidi_install.sh
if awk "BEGIN {exit !($hardware_version < 2.0)}"; then
printf "\n===== GFX HAT LCD support install =====\n"
setup/pkgs/gfxhat_install.sh
fi
if [[ $plugins == true ]]; then
printf "\n===== Get extra plugins =====\n"
setup/plugins/get_plugins.sh
printf "\n===== Get example pedalboards =====\n"
setup/pedalboards/get_pedalboards.sh
fi
printf "\n===== System tweaks =====\n"
setup/sys/config_tweaks.sh
cp setup/sys/bash_aliases ~/.bash_aliases
printf "\n===== Manage services =====\n"
setup/services/create_services.sh
printf "\n===== RT Kernel Install =====\n"
setup/sys/rtkernel.sh
printf "\n===== pi-stomp setup complete - rebooting =====\n"
sudo reboot now