We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b5abe2b commit 30c1038Copy full SHA for 30c1038
C++/Navio/get_dependencies.sh
@@ -0,0 +1,28 @@
1
+#!/bin/bash
2
+
3
+ARCH=`dpkg --print-architecture`
4
5
+confirm_guard() {
6
+ echo "Would you like to install missing dependencies (requires sudo)? [y/n]"
7
+ while true; do
8
+ read answer
9
+ case $answer in
10
+ [Yy]* ) return ;;
11
+ [Nn]* ) exit ;;
12
+ * ) echo "Wrong answer" ;;
13
+ esac
14
+ done
15
+}
16
17
+if [[ "$ARCH" == *"arm"* ]]; then
18
+ if ! dpkg -s pigpio &> /dev/null; then
19
+ confirm_guard
20
+ sudo apt-get update
21
+ sudo apt-get install pigpio
22
+ fi
23
+else
24
+ git submodule update --init --recursive;
25
+ pushd pigpio;
26
+ make CROSS_PREFIX=arm-linux-gnueabihf-
27
+ popd;
28
+fi
0 commit comments