File tree Expand file tree Collapse file tree 1 file changed +17
-8
lines changed
Expand file tree Collapse file tree 1 file changed +17
-8
lines changed Original file line number Diff line number Diff line change 2626# Exit on error
2727# set -e
2828
29- # Enforce that this script is run as root
30- # if [ "$(id -u)" != "0" ]; then
31- # echo "This script must be run as root. Rerun with sudo!" 1>&2
32- # exit 1
33- # fi
34-
3529# ## Variables
3630
3731exec 3>&1
@@ -41,6 +35,13 @@ title="Airframes Installer ${version}"
4135
4236# ## Functions: System
4337
38+ function ensureRoot() {
39+ if [ " $( id -u) " != " 0" ]; then
40+ echo " This script must be run as root. Rerun with sudo!" 1>&2
41+ exit 1
42+ fi
43+ }
44+
4445function platform() {
4546 local platform=$( uname -s)
4647 echo " $platform "
@@ -63,9 +64,9 @@ function installPlatformDependencies() {
6364 local platform=$( platform)
6465 if [ " $platform " == " Linux" ]; then
6566 apt-get update
66- apt-get install -y git dialog
67+ apt-get install -y git dialog jq
6768 elif [ " $platform " == " Darwin" ]; then
68- brew install git dialog
69+ brew install git dialog lsusb jq
6970 fi
7071}
7172
@@ -146,6 +147,8 @@ function installManualAcarsdec() {
146147
147148# ## Main
148149
150+ ensureRoot
151+
149152platformSupported
150153if [ $? -ne 0 ]; then
151154 showPlatformNotSupported
208211 if [ " $result " = " 3" ]; then
209212 echo " Installing with packages"
210213 fi
214+ ;;
211215
216+ 2)
217+ source ./utils/detect-sdrs.sh
218+ sdrs=$( detectSDRs)
219+ dialog --title " Detected SDRs" --msgbox " $sdrs " 10 50
220+ sleep 5
212221
213222 esac
214223done
You can’t perform that action at this time.
0 commit comments