This repository was archived by the owner on Apr 18, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -21,6 +21,13 @@ function set_sdk_link () {
2121 SDK_NAME=${SDK_FILE% .zip} # SDK folder name without extension
2222}
2323
24+ function set_familypack_link () {
25+ FAMILYPACK_LINK=$1
26+
27+ FAMILYPACK_FILE=${FAMILYPACK_LINK##*/ }
28+ FAMILYPACK_NAME=${FAMILYPACK_FILE% .pack}
29+ }
30+
2431# Configuration of the destination folder (relative path from this script)
2532function set_dl_location () {
2633 DL_LOCATION=" $ABS_PATH /$1 "
@@ -160,13 +167,31 @@ function sdk_download () {
160167 # Keep only the components and the connectivity application ?
161168}
162169
170+ function familypack_download () {
171+ if [[ -z " ${FAMILYPACK_NAME} " ]]; then
172+ fatal " Invalid Device Family Pack link"
173+ fi
174+
175+ echo " > Downloading Device Family Pack '${FAMILYPACK_NAME} '..."
176+
177+ curl --progress-bar -o $DL_LOCATION /$SDK_NAME /$FAMILYPACK_FILE $FAMILYPACK_LINK
178+
179+ err_code=$?
180+ if [ " $err_code " != " 0" ]; then
181+ fatal " Could not download Device Family Pack from '${FAMILYPACK_LINK} '"
182+ fi
183+ }
184+
163185function main() {
164186
165187 while [ " $1 " != " " ]; do
166188 case $1 in
167189 -l | --link ) shift
168190 set_sdk_link $1
169191 ;;
192+ -f | --familypack ) shift
193+ set_familypack_link $1
194+ ;;
170195 -d | --dest ) shift
171196 set_dl_location $1
172197 ;;
@@ -186,6 +211,7 @@ function main() {
186211 check_config
187212 sdk_download
188213 sdk_patch
214+ familypack_download
189215
190216 echo " > SDK ready to use. Exit."
191217 exit
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ ABS_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
77
88source $ABS_PATH /../bootstrap.sh \
99 -l ' https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v11.x.x/nRF5_SDK_11.0.0_89a8197.zip' \
10+ -f ' https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.5.0.pack' \
1011 -d " ../sdk" \
1112 -p ' sd_api_v2/sdk110_connectivity.patch'
Original file line number Diff line number Diff line change @@ -7,5 +7,6 @@ ABS_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
77
88source $ABS_PATH /../bootstrap.sh \
99 -l ' https://developer.nordicsemi.com/nRF5_SDK/nRF5_SDK_v14.x.x/nRF5_SDK_14.0.0_3bcc1f7.zip' \
10+ -f ' https://developer.nordicsemi.com/nRF5_SDK/pieces/nRF_DeviceFamilyPack/NordicSemiconductor.nRF_DeviceFamilyPack.8.14.1.pack' \
1011 -d " ../sdk" \
1112 -p ' sd_api_v5/sdk140_connectivity.patch'
You can’t perform that action at this time.
0 commit comments