File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 2
2
target_sdk_dir=""
3
3
post_install_cleanup=1
4
4
confirm=0
5
- rc_confirm=0
5
+ rc_confirm=""
6
6
7
7
usage () {
8
8
cat << EOF
@@ -19,6 +19,9 @@ Options:
19
19
-y
20
20
Automatic yes to prompts; assume "yes" as answer to all prompts.
21
21
22
+ -[no]rc
23
+ Whether to create/update the ~/.zerphyrc file (prompt if not given)
24
+
22
25
EOF
23
26
}
24
27
@@ -65,6 +68,12 @@ while [ "$1" != "" ]; do
65
68
confirm="y";
66
69
rc_confirm="y";
67
70
;;
71
+ -rc )
72
+ rc_confirm="y";
73
+ ;;
74
+ -norc )
75
+ rc_confirm="n";
76
+ ;;
68
77
* )
69
78
echo "Error: Invalid argument \"$1\""
70
79
usage
@@ -115,7 +124,7 @@ do_zephyrrc()
115
124
echo " export ZEPHYR_TOOLCHAIN_VARIANT=zephyr"
116
125
echo " export ZEPHYR_SDK_INSTALL_DIR=$target_sdk_dir"
117
126
echo
118
- if [ "$rc_confirm" != "y " ]; then
127
+ if [ -z "$rc_confirm" ]; then
119
128
echo "Update/Create $HOME/.zephyrrc with environment variables setup for you (y/n)? "
120
129
while read rc_confirm; do
121
130
[ "$rc_confirm" = "Y" -o "$rc_confirm" = "y" \
You can’t perform that action at this time.
0 commit comments