react-native-webview/bin/setup

27 lines
679 B
Bash
Executable File

#! /bin/bash
# Node installed?
if ! [ -x "$(command -v node)" ]; then
echo 'Error: node is not installed.' >&2
if ! [ -x "$(command -v brew)" ]; then
echo 'Go here to install: https://nodejs.org/en/download/'
fi
if [ -x "$(command -v brew)" ]; then
echo 'You have Homebrew installed, so run "brew install node".'
fi
exit 1
fi
# React Native installed?
if ! [ -x "$(command -v react-native)" ]; then
echo 'Error: React Native is not installed.' >&2
echo 'Go here: https://facebook.github.io/react-native/docs/getting-started.html' >&2
echo 'Use the "Building Projects With Native Code" option.'
exit 1
fi
# TODO: Automate setup on new machines