Skip to content

Commit e90b6f0

Browse files
committed
install.sh: Replace echo with printf
Based on https://stackoverflow.com/questions/48344624/echo-prints-n-differently-between-bin-sh-and-bin-bash recommended is to use printf, hence replaced echo. Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
1 parent 82324f7 commit e90b6f0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

install.sh

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,19 @@
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+
printf '%s\n' "Cloning ArduinoCore API in $API_FOLDER"
6+
git clone git@github.com:arduino/ArduinoCore-API ~/.ArduinoCore-API
7+
else
8+
printf '%s\n' "API Folder already exists, skipping clone..."
9+
fi
510

6-
echo "Commenting out WCharacter.h because it fails to build properly"
11+
printf '%s\n' "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 -e "\n\nLinking..."
15+
printf '%s\n' "Linking..."
1116
ln -sf ~/.ArduinoCore-API/api cores/arduino/.
1217

13-
echo "\nModule Successfully installed..."
18+
printf '%s\n' "Module Successfully setup..."
1419

0 commit comments

Comments
 (0)