Skip to content

Commit e3deda9

Browse files
[SILABS] Add user warning for first time install (project-chip#43611)
* add user warning for first time install * fix comments
1 parent 60f6e13 commit e3deda9

1 file changed

Lines changed: 35 additions & 4 deletions

File tree

scripts/examples/gn_silabs_example.sh

Lines changed: 35 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@ else
3636
PW_PATH="$PW_ENVIRONMENT_ROOT/cipd/packages/pigweed"
3737
fi
3838

39-
env
4039
USE_WIFI=false
4140
USE_DOCKER=false
4241
USE_GIT_SHA_FOR_VERSION=true
@@ -325,9 +324,41 @@ else
325324
fi
326325

327326
# Run install-packages once (creates .install-packages-done when done); skip when using Docker (SDK is in image)
328-
if [ "$USE_DOCKER" != true ]; then
329-
pip install -r "$CHIP_ROOT/integrations/docker/images/stage-2/chip-build-efr32/requirements.txt"
330-
python3 "$CHIP_ROOT/scripts/setup/silabs/install-packages.py" || exit 1
327+
if [ "$USE_DOCKER" != true ] && [ ! -f "$CHIP_ROOT/scripts/setup/silabs/.install-packages-done" ]; then
328+
329+
INSTALL_EVERYTHING=false
330+
cat <<'EOF'
331+
!!!!!!!!! FIRST TIME INSTALL !!!!!!!!!
332+
Do you agree to install SILICON LABS PACKAGES MANAGER?
333+
334+
This will take around 8GB of spaces which will include but not limited to :
335+
SLT (silabs packages manager), zap, arm-gcc,
336+
337+
Most of the files will be located under ~/.silabs,
338+
some symbolic link will be created and it will replace simplicity_sdk submodule
339+
EOF
340+
341+
while true; do
342+
read -p "Do you want to proceed? (y/n): " yn
343+
case $yn in
344+
[Yy]*)
345+
INSTALL_EVERYTHING=true
346+
break
347+
;; # Case for yes/Y
348+
[Nn]*)
349+
echo "You won't be asked again"
350+
break
351+
;; # Case for no/N
352+
*) echo "Invalid response. Please answer yes or no." ;; # Case for invalid input
353+
esac
354+
done
355+
356+
if [ "$INSTALL_EVERYTHING" == true ]; then
357+
pip install -r "$CHIP_ROOT/integrations/docker/images/stage-2/chip-build-efr32/requirements.txt"
358+
python3 "$CHIP_ROOT/scripts/setup/silabs/install-packages.py" || exit 1
359+
else
360+
touch "$CHIP_ROOT/scripts/setup/silabs/.install-packages-done"
361+
fi
331362
fi
332363

333364
# Zap generation requires activation

0 commit comments

Comments
 (0)