|
@@ -0,0 +1,26 @@
|
|
1
|
+#! /bin/bash
|
|
2
|
+
|
|
3
|
+# Node installed?
|
|
4
|
+if ! [ -x "$(command -v node)" ]; then
|
|
5
|
+ echo 'Error: node is not installed.' >&2
|
|
6
|
+
|
|
7
|
+ if ! [ -x "$(command -v brew)" ]; then
|
|
8
|
+ echo 'Go here to install: https://nodejs.org/en/download/'
|
|
9
|
+ fi
|
|
10
|
+
|
|
11
|
+ if [ -x "$(command -v brew)" ]; then
|
|
12
|
+ echo 'You have Homebrew installed, so run "brew install node".'
|
|
13
|
+ fi
|
|
14
|
+
|
|
15
|
+ exit 1
|
|
16
|
+fi
|
|
17
|
+
|
|
18
|
+# React Native installed?
|
|
19
|
+if ! [ -x "$(command -v react-native)" ]; then
|
|
20
|
+ echo 'Error: React Native is not installed.' >&2
|
|
21
|
+ echo 'Go here: https://facebook.github.io/react-native/docs/getting-started.html' >&2
|
|
22
|
+ echo 'Use the "Building Projects With Native Code" option.'
|
|
23
|
+ exit 1
|
|
24
|
+fi
|
|
25
|
+
|
|
26
|
+# TODO: Automate setup on new machines
|