forked from arduino/ArduinoCore-zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall.sh
executable file
·29 lines (23 loc) · 873 Bytes
/
install.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
#!/bin/bash
set -e;
printf '%s\n' "Before running this script, make sure of the following:"
printf '%s\n' "1. You have zephyr installed properly on your system."
printf '%s\n' "2. Updated west.yml in zephyr and run west update to pull this module in proper location."
printf '%s\n' "If you meet the above criteria, please enter [yY]Yes and if not, then [nN]No."
read answer;
if [ "$answer" != "${answer#[Yy]}" ] ;then
printf '%s\n' "Yes";
else
printf '%s\n' "No";
exit 1;
fi
API_FOLDER=~/.ArduinoCore-API
if [ ! -d "$API_FOLDER" ] ; then
printf '%s\n' "Cloning ArduinoCore API in $API_FOLDER";
git clone [email protected]:arduino/ArduinoCore-API ~/.ArduinoCore-API;
else
printf '%s\n' "API Folder already exists, skipping clone...";
fi
printf '%s\n' "Linking...";
ln -sf ~/.ArduinoCore-API/api cores/arduino/. ;
printf '%s\n' "Module Successfully setup...";