Skip to content

Commit 18a9475

Browse files
committed
install.sh: Add confirmation qns in beginning
This is to make sure the user has satisfied criterion to run the script successfully Signed-off-by: Dhruva Gole <goledhruva@gmail.com>
1 parent e90b6f0 commit 18a9475

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

install.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
#!/bin/bash
2+
set -e
3+
4+
printf '%s\n' "Before running this script, make sure of the following:"
5+
printf '%s\n' "1. You have zephyr installed properly on your system."
6+
printf '%s\n' "2. Updated west.yml in zephyr and run west update to pull this module in proper location."
7+
printf '%s\n' "If you meet the above criteria, please enter [yY]Yes and if not, then [nN]No."
8+
read answer
9+
10+
if [ "$answer" != "${answer#[Yy]}" ] ;then
11+
printf '%s\n' "Yes"
12+
else
13+
printf '%s\n' "No"
14+
exit 1
15+
fi
216

317
API_FOLDER=~/.ArduinoCore-API
418
if [ ! -d "$API_FOLDER" ] ; then

0 commit comments

Comments
 (0)