summarylogtreecommitdiffstats
path: root/0002-scripts-template_dir-don-t-prompt-for-cmake-when-y-s.patch
blob: a7afbb9acb6033c21c19888422fd361a088c8086 (plain)
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
29
30
31
32
33
From e2e27bb5c5c044203c6085279a99514416799c51 Mon Sep 17 00:00:00 2001
From: Alexei Colin <ac@alexeicolin.com>
Date: Sat, 18 Jul 2020 12:04:52 -0400
Subject: [PATCH 2/4] scripts/template_dir: don't prompt for cmake when -y set

---
 scripts/template_dir | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/scripts/template_dir b/scripts/template_dir
index ab3394c..b03d4b5 100644
--- a/scripts/template_dir
+++ b/scripts/template_dir
@@ -163,15 +163,7 @@ do_cmake_package()
 			return
 		fi
 
-		echo "Do you want to register the Zephyr-sdk at location: $target_sdk_dir"
-		echo "  in the CMake package registry (y/n)?"
-
-		while read confirm; do
-			[ "$confirm" = "Y" -o "$confirm" = "y" -o "$confirm" = "n" \
-			-o "$confirm" = "N" ] && break
-			echo "Invalid input \"$confirm\", please input 'y' or 'n': "
-		done
-
+		read_confirm "registering Zephyr-sdk CMake module with path $target_sdk_dir "
 		if [ "$confirm" = "y" -o "$confirm" = "Y" ]; then
 			if [ ! -d $ZEPHYR_SDK_REGISTRY_DIR ]; then
 				mkdir -p $ZEPHYR_SDK_REGISTRY_DIR
-- 
2.27.0