Skip to content

Commit 6aee693

Browse files
committed
install.sh: add linking step
Also make git clone smarter, by performing check if there is existing repo cloned or not. Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
1 parent 5344559 commit 6aee693

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

install.sh

100644100755
Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,18 @@
11
#!/bin/bash
22

3-
echo "Cloning ArduinoCore API in" $HOME
4-
git clone git@github.com:arduino/ArduinoCore-API ~/.ArduinoCore-API
3+
API_FOLDER=~/.ArduinoCore-API
4+
if [ ! -d "$API_FOLDER" ] ; then
5+
echo "Cloning ArduinoCore API in" $API_FOLDER
6+
git clone git@github.com:arduino/ArduinoCore-API ~/.ArduinoCore-API
7+
else
8+
echo "API Folder already exists, skipping clone..."
9+
fi
510

611
echo "Commenting out WCharacter.h because it fails to build properly"
712
sed '/WCharacter.h/ s/./\/\/ &/' ~/.ArduinoCore-API/api/ArduinoAPI.h > ~/.ArduinoCore-API/api/tmpArduinoAPI.h
813
mv ~/.ArduinoCore-API/api/tmpArduinoAPI.h ~/.ArduinoCore-API/api/ArduinoAPI.h
914

10-
echo "Linking..."
11-
#ln -s ~/Downloads/ArduinoCore-API/api ~/zephyrproject/modules/lib/Arduino-Zephyr-API/cores/arduino/.
15+
echo "\n\nLinking..."
16+
ln -sf ~/.ArduinoCore-API/api ~/zephyrproject/modules/lib/Arduino-Zephyr-API/cores/arduino/.
17+
18+
echo "\nModule Successfully installed..."

0 commit comments

Comments
 (0)